Using JMSReader with IBM WebSphere MQ
The following summary assumes that you are, or are working with, an experienced WebSphere system administrator. This has been tested on WMQ version 7.5.
WMQ Configuration
If an appropriate user account for use by JMSReader does not already exist, create one. Specify this as the value for JMSReader's UserName property.
Add the Striim user to the mqm group.
Create a QueueManager.
Start the QueueManager’s listener.
Create a server connection channel for the QueueManager.
Create a queue.
Copy
JMSAdmin.config
from<WMQ installation location>/java/lib/
to theJNDI-Directory
where you want to create the binding for use by Striim.Edit this file and set
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
andPROVIDER_URL=<
path from root
>/JNDI-Directory
.Using MQ Explorer, under JMS administered objects create a new initial context and connection factory as described in chapter 3 of IBM's white paper, "Configuring and running simple JMS P2P and Pub/Sub applications in MQ 7.0, 7.1, 7.5 and 8.0." Specify this connection factory's name (for example,
StriimCF
) as the value for JMSReader's ConnectionFactoryName property.Create a JMS queue using the queue, initial context, and connection factory from the steps above. Specify this queue's name (for example,
StriimJMSQueue
) as the value for JMSReader's QueueName property.
The following steps may also be necessary:
Provide access to MCAUSER and configure CHLAUTH rules accordingly.
Configure firewall to allow inbound connections if needed.
Striim configuration
Copy the following files from
<
WMQ installation location
>/java/
toStriim/lib
and restart Striim:com.ibm.mq.jms.jar
com.ibm.mq.jmqi.jar
com.ibm.mq.headers.jar
fscontext.jar
providerutil.jar
jms.jar
com.ibm.mq.allclient.jar
Using the JMSAdmin tool, generate a
.bindings
file for the JMSReader. Details on the use of the JMSAdmin tool are available in IBM's documentation. The following example creates a sample.bindings
file.Example 1. Using JMSAdmin to create a.bindings
file$ cd /opt/mqm/java/bin -- sample JMSAdmin.config $ cat JMSAdmin.config INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory PROVIDER_URL=file:///tmp/jndi SECURITY_AUTHENTICATION=none $ mkdir /tmp/jndi $ ./JMSAdmin InitCtx> DEFINE QCF(mqqcf) QMGR(QM1) tran(client) chan(DEV.APP.SVRCONN) host(localhost) port(1414) InitCtx> DEFINE Q(DEV.QUEUE.1) QUEUE(DEV.QUEUE.1) QMGR(QM1) InitCtx> END
Copy the
.bindings
file from theJNDI-Directory
you created above to a location accessible to Striim (for example,/users/striim/JNDI
). This is the location to specify in JMSReader's Provider property. Since this is a file, set JMSReader's Ctx property tocom.sun.jndi.fscontext.RefFSContextFactory
.Edit the
.bindings
file and change all occurrences oflocalhost
with the IP address of server hosting the queue. For example, if the IP address were 198.51.100.1, you would changelocalhost(1414)
to198.51.100.0(1414)
.
JMSReader properties
With the above configuration, the JMSReader properties would be:
CREATE SOURCE WMQSource using JMSReader ( connectionfactoryname:'mqqcf', Ctx:'com.sun.jndi.fscontext.RefFSContextFactory', Provider:'file:/users/striim/JNDI/', Queuename:'StriimJMSQueue', username:'striim', password:'******' ) ...