IBMStreams com.ibm.streamsx.jms Toolkit > com.ibm.streamsx.jms 2.0.0 > com.ibm.streamsx.jms > JMSSink
The JMSSink operator creates messages from InfoSphere Streams tuples and writes the messages to a WebSphere MQ or an Apache Active MQ queue or topic.
The incoming tuple from InfoSphere Streams can contain one or more attributes, each of which can be of the following data types: int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64, boolean, blob, rstring, decimal32, decimal64, decimal128, ustring, or timestamp. The input tuple is serialized into a JMS message. For the JMSSink operator, the following message classes are supported: map, stream, bytes, xml, wbe, wbe22, and empty. The type of message is specified as the value of the message_class attribute in the connection specifications document.
The JMSSink operator provides support for SSL via these parameters: sslConnection, keyStore, keyStorePassword and trustStore. When sslConnection is set to true, the keyStore, keyStorePassword and trustStore parameters must be set.
Note: The JMSSink operator configures SSL by setting the JVM system properties via calls to System.property(). Java operators that are fused into the same PE share the same JVM. This implies that any other Java operators fused into the same PE as the JMSSink operator will have these SSL properties set. If this is undesirable, then the JMSSink operator should be placed into it's own PE.
The JMSSink operator can be an operator within the reachability graph of a operator-driven consistent region. It cannot be the start of a consistent region.
When this operator is participating in a consistent region, the parameter consistentRegionQueueName must be specified.
JMSSink operator is using transacted session to achieve the purpose of consistent region and parameters reconnectionPolicy, reconnectionBound, period, maxMessageSendRetries and messageSendRetryDelay must not be specified. This is due to the fact that if connection problem occurs, the messages sent since the last successful checkpoint would be lost and it is not necessary to continue to process message even after connection is established again. In this case the operator needs to reset to the last checkpoint and re-send the messages again, thus re-connection policy would not apply when it is participating in a consistent region
Required: access, connection
Optional: appConfigName, classLibs, codepage, connectionDocument, consistentRegionQueueName, jmsHeaderProperties, keyStore, keyStorePassword, maxMessageSendRetries, messageSendRetryDelay, passwordPropName, period, reconnectionBound, reconnectionPolicy, sslConnection, sslDebug, trustStore, trustStorePassword, userPropName
The JMSSink operator is configurable with a single input port. This input port is a data port and is required. The input port is non-mutating and its punctuation mode is Oblivious.
The JMSSink operator is configurable with an optional output port that submits the error message and the tuple(optional) that caused this error. The optional output port is mutating and its punctuation mode is Free. This optional error output port contains an optional first attribute that contains the input tuple that caused the error and a second attribute of type rstring that contains the error message. Only one error message is sent for each failed tuple.
Required: access, connection
Optional: appConfigName, classLibs, codepage, connectionDocument, consistentRegionQueueName, jmsHeaderProperties, keyStore, keyStorePassword, maxMessageSendRetries, messageSendRetryDelay, passwordPropName, period, reconnectionBound, reconnectionPolicy, sslConnection, sslDebug, trustStore, trustStorePassword, userPropName
This mandatory parameter identifies the access specification name.
This parameter specifies the name of application configuration that stores client credential information, the credential specified via application configuration overrides the one specified in connections file.
Allows the user to specify paths to JAR files that should be loaded into the operators classpath. The values of this parameter may point to a specific JAR file, or to a directory. If pointing to a directory, the operator will load all files ending in .jar onto the classpath. If the parameter is set, only its values are used to identify class libraries. If the parameter is not set, the operator falls back to the old implementation referring to environment variables STREAMS_MESSAGING_WMQ_HOME and STREAMS_MESSAGING_AMQ_HOME.
This optional parameter specifies the code page of the target system that is used to convert ustring for a Bytes message type. If this parameter is specified, it must have exactly one value, which is a String constant. If the parameter is not specified, the operator uses the default value of UTF8.
This mandatory parameter identifies the name of the connection specification that contains a JMS element.
This optional parameter specifies the path name of the file that contains the connection and access specifications, which are identified by the connection and access parameters. If the parameter is not specified, the operator uses the file that is in the default location ../etc/connections.xml.
This is a required parameter if this operator is participating in a consistent region. This parameter specifies the queue to be used to store consistent region specific information and the operator will perform a JNDI lookup with the queue name specified at initialization state. The queue name specified must also exist on the same messaging server where this operator is establishing the connection.
Specifies the mapping between JMS Header property values andStreams tuple attributes. The format of the mapping is:
"propertyName1/streamsAttributeName1/typeSpecifier1","propertyName2/streamsAttributeName2/typeSpecifier2","..." ;
Leading and trailing spaces are trimmed from property and
attribute names. The properties can be of the following types:
Type specifier |
Java / Property type |
SPL / Attribute type |
bool |
boolean |
boolean |
byte |
byte |
int8 |
short |
short |
int16 |
int |
int |
int32 |
long |
long |
int64 |
float |
float |
float32 |
double |
double |
float64 |
string |
String |
rstring |
object |
Object |
ustring, uint8, uint16, uint32, uint64 |
If property or attribute type do not match the specified type, an error is logged during operator initialization.
This parameter specifies the path to the keyStore. If a relative path is specified, the path is relative to the application directory. The sslConnection parameter must be set to true for this parameter to have any effect.
This parameter specifies the password for the keyStore given by the keyStore parameter. The sslConnection parameter must be set to true for this parameter to have any effect.
This optional parameter specifies the number of successive retries that are attempted for a message if a failure occurs when the message is sent. The default value is zero; no retries are attempted.
This optional parameter specifies the time in milliseconds to wait before the next delivery attempt. If the maxMessageSendRetries is specified, you must also specify a value for this parameter.
This parameter specifies the property name of password in the application configuration. If the appConfigName parameter is specified and the passwordPropName parameter is not set, a compile time error occurs.
This parameter specifies the time period in seconds the operator waits before it tries to reconnect. It is an optional parameter of type float64. You can use this parameter only when the reconnectionPolicy parameter is specified, otherwise a compile time error occurs. The default value for the period parameter is 60.
This optional parameter of type int32 specifies the number of successive connections that are attempted for an operator. You can use this parameter only when the reconnectionPolicy parameter is specified and set to BoundedRetry, otherwise a run time error occurs. If the reconnectionBound parameter is specified and the reconnectionPolicy parameter is not set, a compile time error occurs. The default value for the reconnectionBound parameter is 5.
This is an optional parameter that specifies the reconnection policy. The valid values are NoRetry, InfiniteRetry, and BoundedRetry. If the parameter is not specified, the reconnection policy is set to BoundedRetry with a reconnectionBound of 5 and a period of 60 seconds.
This parameter specifies whether the operator should attempt to connect using SSL. If this parameter is specified, then the keyStore, keyStorePassword and trustStore parameters must also be specified. The default value is false.
If SSL/TLS protocol debugging is enabled, all protocol data and information is logged to the console. Use this to debug TLS connection problems. The default is 'false'.
This parameter specifies the path to the trustStore. If a relative path is specified, the path is relative to the application directory. The sslConnection parameter must be set to true for this parameter to have any effect.
This parameter specifies the password for the trustStore given by the trustStore parameter. The sslConnection parameter must be set to true for this parameter to have any effect.
This parameter specifies the property name of user name in the application configuration. If the appConfigName parameter is specified and the userPropName parameter is not set, a compile time error occurs.
The number of failed inserts to the WebSphere MQ or the Apache ActiveMQ. Failed insertions can occur when a message is dropped because of a run time error.
The number of reconnection attempts that are made before a successful connection.
The number of tuples that had truncated attributes when they were converted to a message.