Put message on remote queue using WebSphere MQ Explorer

Home > Search

Before you can put a message on a remote queue, you will need two queue managers, where one queue manager will be on the machine that is sending the message, and the other queue manager is on the machine that is receiving the message. The sender should have a local transmission queue and a remote queue definition, and the receiver should have a remote queue. There should also be a server connection channel between machine 1 (the sender) and machine 2 (the receiver).


If the client machine is Windows

  1. Open the Control Panel.
  2. Select System.
  3. Select the Advanced tab.
  4. Select the Environment Variables button.
  5. In the User Variables pane, select New.
  6. Enter the following:
    1. Name = MQSERVER
    2. Type CLIENT.<remote queue manager name>/TCP/<mq server hostname>(port). For example: CLIENT.MANAGER02/TCP/mq.example.com(1414)
  7. Select OK. 

If the client machine is Linux​

Change to the user account that is used to connect to the MQ Server. For example, let's say John Doe's account is used to connect to the MQ Server.

~]# cd JohnDoe


Add the following to the end of the /home/<username>/.bash_profile file.  For example: CLIENT.MANAGER02/TCP/mq.example.com(1414)

MQSERVER=CLIENT.<remote queue manager name>/TCP/<mq server hostname>(port)


Use the amqsput command to put a message onto a remote queue.

amqsput QUEUE01 MANAGER01
Sample amqsput0 start
target queue is QUEUE01


Enter some text, and press enter twice.

This is a test


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter in the box below so that we can be sure you are a human.