WebSphere MQ Example
The WebSphere MQ example demonstrates using Mule's transport for WebSphere MQ to send and receive transactional messages to WebSphere MQ. This example is available in the enterprise edition of Mule as of version 2.2.3.
Prerequisites
Before you can run the example, ensure the following:
- Mule enterprise 2.2.3 or later is installed.
- WebSphere MQ 6 or 7 is installed.
- The WebSphere MQ client JARs are available to you.
To run the example, you must have the WebSphere MQ client jars present in your $MULE_HOME/lib/user directory. You can either copy them there yourself, or if you have them in your local Maven repository, building the example with Maven will copy them there automatically.
Next, you need to edit the following properties in $MULE_HOME/examples/wmq/conf/wmq.properties to reflect your WebSphere MQ installation:
wmq.host=
wmq.port=
wmq.queue.manager=
wmq.username=
wmq.password=
Lastly, make sure your WebSphere MQ installation has queues named "in" and "out" created.
Starting the Example
At the command prompt, navigate to the $MULE_HOME/examples/wmq directory and type ./wmq (on Linux) or wmq.bat (on Windows) to run the example.
After it starts up, you are prompted to enter text to send a message to WebSphere MQ. Any text you enter becomes a JMS text message sent to the inbound WMQ queue "in".
Testing the Example
The $MULE_HOME/examples/wmq directory contains a file called test_data. You can copy and paste the contents of this file at the command prompt to send a large number of events to WebSphere MQ.
For more information, see Mule WMQ transport in the Mule User's Guide.