JMSSubscriber

JMSSubscriber is a JMS message producer that subscribes a JMS Topic. It receives JMS messages from the topic and puts them to an internal XQueue as the output. JMSSubscriber supports all JMS implentations via JNDI. Only one operation, sub, is supported. It also supports flow control and XA. Fault tolerance with auto reconnections is built in.

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 JMSSubscriber, you can do that by specifying an empty JMSReplyTo in the StringProperty.

Apart from the common properties, there are many implementation specific properties for JMSSubscriber.
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 TopicConnectionFactory
TopicName string mandatory JMS topic topic/notification
ClientID string mandatory id for the client client1
SubscriptionID string mandatory for durable subs only id for durable subscriptions sub1
MessageSelector string optional JMS message selector messageType = 6 OR messageType = 8
where most of the implementation specific properties are for JNDI service.

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 JMSSubscriber.
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 MQ 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
StoreOption integer of 0 or 1 optional store option for subscriptions 0: for queue, 1: for broker
BrokerVersion integer of 1 or 2 optional broker version 1 (default: 2)
where SecurityExit specifies the full classname for WMQ authentications.

Here is an example of JMSSubscriber:

{
  "Name": "rcvr_jboss_sub",
  "ClassName": "org.qbroker.receiver.JMSSubscriber",
  "URI": "jnp://localhost:1100",
  "ContextFactory": "org.jnp.interfaces.NamingContextFactory",
  "URLPkgs": "org.jboss.naming",
  "ConnectionFactoryName": "ConnectionFactory",
  "TopicName": "topic/Notification",
  "Operation": "sub",
  "MessageSelector": "messageType=6 OR messageType = 8",
  "ClientID": "quest",
  "Mode": "daemon",
  "Username": "guest",
  "Password": "guest",
  "EnableExceptionListener": "true",
  "LinkName": "jboss",
  "Capacity": "1024",
  "Partition": "0,0",
  "XAMode": "0",
  "DisplayMask": "22",
  "Tolerance": "0",
  "MaxRetry": "2"
}