When installing the RA.JMS agent with IBM MQ queue manager, there are a number of details that are not specifically outlined in the documentation.
This KB details the gotchas to successfully run sender/receiver jobs with the RA.JMS agent against IBM MQ.
Note that currently the product is called IBM MQ, while before it was called IBM Websphere MQ. These names are used interchangeably but these are the same product (see: https://en.wikipedia.org/wiki/IBM_MQ#History).
This KB is based on IBM MQ v9.2 that was installed from freely available a Docker image (https://developer.ibm.com/tutorials/mq-connect-app-queue-manager-containers/)
First install RA.JMS as described in the documentation.
Then follow the general steps outlined in the documentation, but take note of the details outlined below regarding the configuration in client 0, the creation of the connection object and the setup of a job.
Because the JNDI object plays a central role as a interface between the agent and the queue manager, a short explanation is given in the section Additional Information about how to create the necessary JNDI file with IBM MQ Explorer
Release : 2.x
Component : RA JMS
In the JMS agent definition in client 0, choose the entire java lib-folder of the IBM MQ application in Provider Details, there is no need to select individual JAR files.
The <IBM MQ>/java/lib folder can be found here in the installation directory of IBM MQ: /opt/mqm/java/lib/
If needed you can copy the entire lib-folder to a subfolder of the RA.JMS installation:
Create a new CONN object of type JMSCONNECTION
In Agent Settings choose the installed agent and the Provider Type IBM Websphere MQ
Fill out the General JNDI Properties as in the screenshot below:
Note that the Provider URL points to a folder that contains the JNDI file ('.bindings') that you received from your IBM MQ administrator (created with IBM MQ Explorer).
The entry in the field Connection Factory has to correspond to the name of the Connection Factory defined in the JNDI.
If necessary provide the User and Password in the Security section.
The creation of a Sender or Receiver job is fairly self-explanatory.
One detail is important: the Queue or Topic has to exist in the provided JNDI file.
The minimum content of the JNDI files are (i) a Connection Factory and (ii) a Destination (Queue or Topic).
When creating a new Connection Factories or Destinations the information is appended to a JNDI file called .bindings:
Use 'Add Initial Context' by right-clicking JMS Administrated Objects to indicate a folder where the JNDI file called '.bindings' will be stored.
Right click Connection Factories and choose New > Connection Factory... and follow the steps in the Wizard:
Screen 1
Screen 2
Screen 3 (leave blank)
Screen 4 (summary)
All other field can be left untouched or can be set as required.
Save the Connection Factory
Right click Destination and choose New > Destination... and follow the steps in the Wizard:
Screen 1
Screen 2 (leave blank)
Screen 3 (summary)
All other field can be left untouched or can be set as required.
Save Destination
Now you can copy the .bindings-file to a subdirectory of the RA.JMS or refer to it if the agent is installed on the same server.