Set up client triggering in WebSphere MQ

Say you want to run a script on a remote machine when the queue is on the server machine. One solution here is to use a client trigger. This means that you run a client trigger monitor on the remote machine. When something lands on the queue on the server the client trigger monitor will run the script on the remote machine. Here is how I set it up

On server:(MQ server installed and configured)

  1. Create a new client channel with chltype(SVRCONN)
  2. Create a new init queue (standard options) – every remote machine needs their own initqueue
  3. Create a process with applicid as it would be if you run the command on the REMOTE machine
  4. Create a new queue with the new init queue and process attached

On the client machine (MQ client installed and configured):

  1. Set the MQSERVER environment variable. Syntax: MQSERVER=’client channel/protocol/adress to server(port)’, eg MQSERVER=’MY.CLIENT.CHANNEL/TCP/
  2. Check that the remote machine can talk to the server
  3. Start the client trigger monitor ‘runmqtmc -m <qmanager> -q <init queue name>’
    • qmanager – the same you made your new queue on
    • init queue name – the init queue to be used
  4. Done!

Now enable trigger on the queue and watch the magic when messages are pouring in.

Tested on RHEL 3 and WebSphere MQ 5.3

  1. Just wanted to mention, you cannot put the client channel in the -q parm, it needs to be the INITQ. The client channel information will be retrieved from the mqclient.ini or the CCDT if provided.

  2. Hi

    I am performing the basic client triggering on my windows machine. I have installed MQ client on my local windows system and calling a notepad.exe as trigger when the message is put on the queue.

    The issue i am facing is every time i put the message on the queue. i need to open the command prompt and run the trigger monitor client command(runmqtmc -m -q ).

    Can you please let me know how to make the client Trigger to be running continuously. so that whenever message is placed on the queue client trigger monitor runs automatically with out manually running the command each time.

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">

This site uses Akismet to reduce spam. Learn how your comment data is processed.