Home
Use your own programs
Test your setup by sending some messages between the two queue managers. In the following example LONDON puts a message to the INVENTQ at NEWYORK and receives a reply on its queue LONDON_reply.
- Define a local queue called LONDON_reply
- Set the MQOPEN options to MQOO_OUTPUT
- Issue the MQOPEN call to open the queue INVENTQ
- Set the ReplyToQ name in the message descriptor to LONDON_reply
- Issue the MQPUT call to put the message
- Commit the message
On NEWYORK:
- Set the MQOPEN options to MQOO_BROWSE
- Issue the MQOPEN call to open the queue INVENTQ
- Issue the MQGET call to get the message from INVENTQ
- Retrieve the ReplyToQ name from the message descriptor
- Put the ReplyToQ name in the ObjectName field of the object descriptor
- Set the MQOPEN options to MQOO_OUTPUT
- Issue the MQOPEN call to open LONDON_reply at queue manager LONDON
- Issue the MQPUT call to put the message to LONDON_reply
On LONDON:
- Set the MQOPEN options to MQOO_BROWSE
- Issue the MQOPEN call to open the queue LONDON_reply
- Issue the MQGET call to get the message from LONDON_reply
Parent topic:
7. Verify and test the cluster
qc10570_
Home