JMSReceiver is a JMS message producer that listens to a JMS Queue. It receives JMS messages from the queue and puts them to an internal XQueue as the output. JMSReceiver supports all JMS implentations via JNDI. Three operations, get, browse and query are supported. It also supports flow control and XA. Fault tolerance with auto reconnections is built in.
JMSReceiver has two stage retries. The first stage of retry is to reopen the queue up to Tolerance times. Between the reopens, it will sleep for PauseTime milli-seconds. If all the reopen fails, the retry enters into the second stage, reconnections. It will reconnect up to MaxRetry times. Between the reconnections, it will sleep for StandbyTime milli-seconds. Then it all the reconnection fails, it will sleep (QuietPeriod + 1) * StandbyTime milli-seconds. Then try to reconnect up to MaxRetry times. So by default, the sleep between the first reconnection and the second is about 75 seconds.
Even though JMS is a standard, there is no guarantee for a message to behave in other vendors' domains. JMSReplyTo is one of the tricky object that is vendor specific. Some vendors' implementations of JMSReplyTo are friendly to other vendors. Others are not. In the worse scenario, you may wish to drop the JMSReplyTo on the message. With JMSReceiver, you can do that by specifying an empty JMSReplyTo in the StringProperty.
Apart from the common properties, there are many implementation specific properties for JMSReceiver.
Property Name | Data Type | Requirement | Description | Examples |
---|---|---|---|---|
ContextFactory | string | mandatory for JNDI | initial context factory for JNDI service | com.sun.jndi.fscontext.RefFSContextFactory |
URLPkgs | string | optional | url pkg prefixes for JNDI | org.jboss.naming |
Principal | string | optional | security pricipal for JNDI | admin |
Credentials | string | optional | security credentials for JNDI | admin |
ConnectionFactoryName | string | mandatory for JNDI | connection factory for JNDI | TestConnectionFactory |
QueueName | string | mandatory | JMS queue | test_in |
MessageSelector | string | optional | JMS message selector | JMSType like '%json' |
ReferenceFile | string | optional | full filename for query only | /var/log/qbroker/.status/myqueue.log |
DependencyGroup | list | optional | list of dep endencis to control frequency of repeated browse | see example |
Beside of generic JMS implementations, there is also a dedicate implementation for IBM WebSphere MQ. For IBM WebSphere MQ, here are the vendor-specific properties for JMSReceiver.
Property Name | Data Type | Requirement | Description | Examples |
---|---|---|---|---|
QueueManager | string | mandatory for binding mode | name of the Queue Manager | BROKER1 |
HostName | string | mandatory for client mode | hostname | broker1 |
Port | integer | optional | port number for WMQ | 1418 (default: 1414) |
ChannelName | string | optional | name of the WMQ SVRCONN channel | TEST (default: SYSTEM.DEF.SVRCONN) |
SecurityExit | string | optional | classname of the securit exit | org.qbroker.wmq.SimpleSecurityExit |
SecurityData | string | optional | argument passed into the securit exit |
Here is an example of JMSReceiver:
{ "Name": "rcvr_qb", "ClassName": "org.qbroker.receiver.JMSReceiver", "URI": "wmq://broker1", "QueueName": "QB_IN", "Operation": "get", "LinkName": "root", "Mode": "daemon", "XAMode": "1", "Tolerance": "0", "MaxRetry": "2", "DisplayMask": "18", "StringProperty": { "Hostname": "broker1", "JMSReplyTo": "" } }where the JMSReplyTo of each incoming message will be dropped.