Peer topics describe three different configurations for a simple cluster. This topic
explains how to verify the cluster.
Before you begin
This topic assumes that you are verifying a cluster you created through one of the following tasks:
For an overview of the cluster that has been created, see Setting up a new cluster.
About this task
You can verify the cluster in one or more of these ways:
- Running administrative commands to display cluster and channel attributes.
- Run the sample programs to send and receive messages on a cluster queue.
- Write your own programs to send a request message to a cluster queue and reply with a response messages to an non-clustered reply queue.
Procedure
Issue DISPLAY
runmqsc commands to verify the cluster.
The responses you see ought to be like
the responses in the steps that follow.
-
From the
NEWYORK queue manager, run the DISPLAY CLUSQMGR
command:
1 : dis clusqmgr(*)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(NEWYORK) CLUSTER(INVENTORY)
CHANNEL(INVENTORY.NEWYORK)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(LONDON) CLUSTER(INVENTORY)
CHANNEL(INVENTORY.LONDON)
-
From the
NEWYORK queue manager, run the DISPLAY CHANNEL
STATUS command:
1 : dis chstatus(*)
AMQ8417: Display Channel Status details.
CHANNEL(INVENTORY.NEWYORK) XMITQ( )
CONNAME(192.0.2.0) CURRENT
CHLTYPE(CLUSRCVR) STATUS(RUNNING)
RQMNAME(LONDON)
AMQ8417: Display Channel Status details.
CHANNEL(INVENTORY.LONDON) XMITQ(SYSTEM.CLUSTER.TRANSMIT.INVENTORY.LONDON)
CONNAME(192.0.2.1) CURRENT
CHLTYPE(CLUSSDR) STATUS(RUNNING)
RQMNAME(LONDON)
Send messages between the two queue managers, using
amqsput.
-
On
LONDON run the command amqsput INVENTQ LONDON.
Type some messages, followed by a blank line.
-
On
NEWYORK run the command amqsget INVENTQ NEWYORK.
You now see the messages you entered on LONDON. After 15 seconds the program
ends.
Send messages between the two queue managers using your own programs.
In the
following steps, LONDON puts a message to the INVENTQ at
NEWYORK and receives a reply on its queue
LONDON_reply.
-
On
LONDON put a messages to the cluster queue.
- 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 receive the message on the cluster queue and put a reply to the
reply queue.
- 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 receive the reply.
- 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.