Verifying the cluster

Peer topics describe three different configurations for a simple cluster. This topic explains how to verify the cluster.

Before you begin

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:
  1. Running administrative commands to display cluster and channel attributes.
  2. Run the sample programs to send and receive messages on a cluster queue.
  3. 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.

  1. From the NEWYORK queue manager, run the DISPLAY CLUSQMGR command:
    
    dis clusqmgr(*)
    
    
    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)
    
  2. From the NEWYORK queue manager, run the DISPLAY CHANNEL STATUS command:
    
    dis chstatus(*)
    
    
    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.

  1. On LONDON run the command amqsput INVENTQ LONDON.

    Type some messages, followed by a blank line.

  2. 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.

  1. On LONDON put a messages to the cluster queue.
    1. Define a local queue called LONDON_reply.
    2. Set the MQOPEN options to MQOO_OUTPUT.
    3. Issue the MQOPEN call to open the queue INVENTQ.
    4. Set the ReplyToQ name in the message descriptor to LONDON_reply.
    5. Issue the MQPUT call to put the message.
    6. Commit the message.
  2. On NEWYORK receive the message on the cluster queue and put a reply to the reply queue.
    1. Set the MQOPEN options to MQOO_BROWSE.
    2. Issue the MQOPEN call to open the queue INVENTQ.
    3. Issue the MQGET call to get the message from INVENTQ.
    4. Retrieve the ReplyToQ name from the message descriptor.
    5. Put the ReplyToQ name in the ObjectName field of the object descriptor.
    6. Set the MQOPEN options to MQOO_OUTPUT.
    7. Issue the MQOPEN call to open LONDON_reply at queue manager LONDON.
    8. Issue the MQPUT call to put the message to LONDON_reply.
  3. On LONDON receive the reply.
    1. Set the MQOPEN options to MQOO_BROWSE.
    2. Issue the MQOPEN call to open the queue LONDON_reply.
    3. Issue the MQGET call to get the message from LONDON_reply.