Skip to main content

JMS Reader

Reads data from the Java Message Service.

See Supported reader-parser combinations) for parsing options.

JMS Reader properties

property

type

default value

notes

Compression Type

String

Set to gzip when the input is in gzip format. Otherwise, leave blank.

Connection Factory Name

String

the name of the ConnectionFactory containing the queue or topic

Crash On Unsupported Message Type

Boolean

True

With the default value of True, when JMSReader encounters a message of an unsupported type, the application will terminate. Set to False to ignore such messages.

Ctx

String

the JNDI initial context factory name

Durable Subscriber Name

String

Leave blank to create a nondurable subscription. Specify a subscriber name to create a durable subscription.

Enable Transaction

Boolean

False

Set to True to use transaction mode. This will ensure that all messages are processed by JMSReader before they are removed from the queue. Transactions will commit based on the Transaction Policy. If Transaction Policy is blank, JMS Reader will use the policy MessageCount:1000, interval:1m.

JMS Provider Config

String

Optionally, specify any required path variables as <property>=<value>, separated by semicolons. For example

com.tibco.tibjms.naming.security_protocol=ssl; 
ssl_enable_verify_hostname=false; 
com.tibco.tibjms.naming.ssl_identity=client_identity.p12; 
com.tibco.tibjms.naming.ssl_password=password; 
com.tibco.tibjms.naming.ssl_trusted_certs=server_root.cert.pem; 
java.property.https.protocols=SSLv3; 
com.tibco.tibjms.naming.ssl_trace=true'

Password

encrypted password

see Encrypted passwords

Provider

String

the path to the JNDI binding

Provider Name

String

If reading from IBM MQ, set to ibmmq. Otherwise leave blank.

Queue Name

String

Leave blank if Topic is specified.

Topic

String

Leave blank if QueueName is specified.

Transaction Policy

String

When Enable Transaction is True, specify a message count and/or interval (s / m / h / d) to control when transactions are committed.

For example, with the settingTransactionPolicy='MessageCount:100, Interval:10s, JMSReader will send a commit message to the broker every ten seconds or sooner if it accumulates 100 messages. If JMSReader is stopped or terminates before sending a commit, the broker will resend the messages in the current transaction when JMSReader is restarted.

When using a transaction policy:

This feature has been tested with ActiveMQ, IBM MQ, and WebLogic.

User Name

String

a messaging system user with the necessary permissions

Note that JMSReader's properties must accurately reflect your configuration. See Using JMSReader with IBM WebSphere MQ for a detailed discussion.

The output type is WAevent except when using JSONParser.

JMS Reader example

The following example is for ActiveMQ:

CREATE SOURCE AMQSource USING JMSReader (
  ConnectionFactoryName:'jms/TestConnectionFactory'
  Ctx:'org.apache.activemq.jndi.ActiveMQInitialContextFactory',
  Provider:'tcp://192.168.123.200:61616',
  QueueName:'jms/TestJMSQueue',
  UserName:'striim',
  Password:'******'
) ...

Message headers are included in the output. For example:

SNMPNT: WAEvent{
  data: ["abc","def"]
  metadata: {"RecordEnd":9,"JMSType":"","RecordOffset":0,"JMSExpiration":0,
  "JMSDestinationName":"TanuTopic","JMSRedelivered":false,"AMQ_SCHEDULED_REPEAT":3,
  "JMSTimestamp":1599633667256,
  "messageid":"ID:Apples-MacBook-Pro-2.local-54631-1599632751529-4:1:1:1:1",
  "JMSDestinationType":"Topic","JMSDeliveryMode":1,"JMSPriority":0,"JMSCorrelationID":"",
  "RecordStatus":"VALID_RECORD"}
  userdata: null
};
TIBCO_EMS_SSL_sysout: JsonNodeEvent{
  data: {"idx":"0","Test":"Test0"}
  metadata: {"JMSPriority":4,"JMSType":null,"JMSXDeliveryCount":1,"JMSExpiration":0,
  "JMSDestinationName":"newqueue5","JMSRedelivered":false,"JMSTimestamp":1598523499812,
  "JMSCorrelationID":null,"JMSDestinationType":"Queue","JMSDeliveryMode":2}
  userdata: null
};