IBMStreams com.ibm.streamsx.messaging Toolkit > com.ibm.streamsx.messaging 5.4.3 > com.ibm.streamsx.messaging.jms > JMSSource
DEPRECATED: The com.ibm.streamsx.messaging.jms.JMSSource operator is deprecated and is replaced by the com.ibm.streamsx.jms.JMSSource operator in the com.ibm.streamsx.jms toolkit. The deprecated operator might be removed in a future release.
The JMSSource operator reads data from a WebSphere MQ or an Apache Active MQ queue or a topic and creates tuples from the read data.
The JMSSource operator converts each WebSphere MQ or Apache Active MQ message to a separate tuple and sends it to the output stream. A single message is converted into a single tuple.
The JMSSource 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 JMSSource 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 JMSSource operator will have these SSL properties set. If this is undesirable, then the JMSSource operator should be placed into it's own PE.
The JMSSource operator can participate in a consistent region. The operator must be at the start of a consistent region.
The operator supports periodic and operator-driven consistent region policies. If the consistent region policy is set as operatorDriven, the triggerCount parameter must be specified. The operator initiates a checkpoint after number of tuples specified by the triggerCount parameter have been processed. If the consistent region policy is set as periodic, the operator respects the period setting and establishes consistent states accordingly.
When a message queue is consumed by multiple message consumers, i.e. multiple JMSSource instances are used to read messages from a same queue, then deterministic routing is required. This requirement can be achieved through the messageSelector parameter. For example, if an SPL application has two JMSSource operator instances and a JMS property named "group" is present on messages that can take value of either 'g1' or 'g2', then each JMSSource operator instance can be assigned in the following manner:
{ param connectionDocument :"/home/streamsuser/connections/JMSconnections.xml"; connection : "amqConn"; access : "amqAccess"; messageSelector : "group = 'g1'"; }
{ param connectionDocument :"/home/streamsuser/connections/JMSconnections.xml"; connection : "amqConn"; access : "amqAccess"; messageSelector : "group = 'g2'"; }
Required: access, connection
Optional: appConfigName, codepage, connectionDocument, initDelay, jmsCorrelationIDOutAttrName, jmsDeliveryModeOutAttrName, jmsDestinationOutAttrName, jmsExpirationOutAttrName, jmsMessageIDOutAttrName, jmsPriorityOutAttrName, jmsRedeliveredOutAttrName, jmsReplyToOutAttrName, jmsTimestampOutAttrName, jmsTypeOutAttrName, keyStore, keyStorePassword, messageIDOutAttrName, messageSelector, passwordPropName, period, reconnectionBound, reconnectionPolicy, sslConnection, triggerCount, trustStore, trustStorePassword, userPropName
The JMSSource operator has one mandatory output and one optional output port. If only the mandatory output port is specified, the operator submits a tuple for each message that is successfully read from the messaging provider. The mandatory output port is mutating and its punctuation mode is Free.
The JMSSource operator has one optional output port, which submits tuples when an error occurs.
If both optional and mandatory output ports are specified, the operator submits a tuple to the mandatory port for each message that is read successfully and a tuple to the optional port if an error occurs when reading a message. The tuple submitted to the optional port contains an error message for each message that could not be read successfully. The optional output port has a single attribute of type rstring that contains this error message. The optional output port is mutating and its punctuation mode is Free.
Required: access, connection
Optional: appConfigName, codepage, connectionDocument, initDelay, jmsCorrelationIDOutAttrName, jmsDeliveryModeOutAttrName, jmsDestinationOutAttrName, jmsExpirationOutAttrName, jmsMessageIDOutAttrName, jmsPriorityOutAttrName, jmsRedeliveredOutAttrName, jmsReplyToOutAttrName, jmsTimestampOutAttrName, jmsTypeOutAttrName, keyStore, keyStorePassword, messageIDOutAttrName, messageSelector, passwordPropName, period, reconnectionBound, reconnectionPolicy, sslConnection, triggerCount, 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.
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 an 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 this parameter is not specified, the operator uses the file that is in the default location ./etc/connections.xml.
This optional parameter specifies the number of seconds that the JMSSource operator delays before it starts to produce tuples. During the delay, the operator is blocked.
Output attribute on output data stream to assign JMSCorrelationID to, the specified attribute in output stream must be of type rstring.
Output attribute on output data stream to assign JMSDeliveryMode to, the specified attribute in output stream must be of type int32.
Output attribute on output data stream to assign JMSDestination to, the specified attribute in output stream must be of type rstring.
Output attribute on output data stream to assign JMSExpiration to, the specified attribute in output stream must be of type int64.
Output attribute on output data stream to assign JMSMessageID to, the specified attribute in output stream must be of type rstring.
Output attribute on output data stream to assign JMSPriority to, the specified attribute in output stream must be of type int32.
Output attribute on output data stream to assign JMSRedelivered to, the specified attribute in output stream must be of type boolean.
Output attribute on output data stream to assign JMSReplyTo to, the specified attribute in output stream must be of type rstring.
Output attribute on output data stream to assign JMSTimestamp to, the specified attribute in output stream must be of type int64.
Output attribute on output data stream to assign JMSType to, the specified attribute in output stream must be of type rstring.
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.
Output attribute on output data stream to assign message ID to, the specified attribute in output stream must be of type rstring.
This optional parameter is used as JMS Message Selector.
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 optional parameter specifies the time period in seconds the operator waits before it tries to reconnect. 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 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.
This optional parameter specifies how many messages are submitted before the JMSSource operator starts to drain the pipeline and establish a consistent state. This parameter must be greater than zero and must be set if the JMSSource operator is the start operator of an operatorDriven consistent region.
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.
stream<${streamType}> ${streamName} = JMSSource() { param connection : "${ConnectionSpecificationName}"; access : "${AccessSpecificationName}"; }
The number of messages that are dropped in the application.
The number of messages that are read successfully from a queue or topic.
The number of reconnection attempts that are made before a successful connection occurs.