You can test your WebSphere MQ resource hierarchy by initiating a manual switchover. This will simulate a failover of a resource instance from the primary server to the backup server.

On the Edit menu, select Resource, then In Service. For example, an In Service request executed on a backup server causes the application hierarchy to be taken out of service on the primary server and placed in service on the backup server. At this point, the original backup server is now the primary server and original primary server has now become the backup server.

If you execute the Out of Service request, the application is taken out of service without bringing it in service on the other server.

Testing Shared Storage Configuration

To test WebSphere MQ shared storage operations, perform the following steps:

  1. Create a temporary test queue on the primary server with the default persistency of “yes

mqm@node1:/opt/mqm/samp/bin> runmqsc TEST.QM
5724-B41 © Copyright IBM Corp. 1994, 2002. ALL RIGHTS RESERVED.
Starting MQSC for queue manager TEST.QM.

define qlocal(TEST) defpsist(yes)
     1 : define qlocal(TEST) defpsist(yes)
AMQ8006: WebSphere MQ queue created.
end

     2 : end
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.

  1. Put a message into the test queue created on the primary node:

mqm@node1:/opt/mqm/samp/bin> echo “HELLO WORLD on NODE1” | ./amqsput TEST TEST.QM
Sample AMQSPUT0 start
target queue is TEST
Sample AMQSPUT0 end

  1. Browse the test queue to see if the message has been stored:

mqm@node1:/opt/mqm/samp/bin> ./amqsbcg TEST TEST.QM

You should see a message with the content “HELLO WORLD on NODE1” and some additional output. Look for the following line and verify that the
persistency is 1:

[…]
   Priority : 0 Persistence : 1
[…]

  1. Switch the resource hierarchy to the standby node.
  1. On the standby server where the queue manager is now active, repeat Step 3. The message should be accessible on the standby server. If not, check your storage configuration.
  1. On the standby server where the queue manager is now active, get the message from the test queue:

mqm@node1:/opt/mqm/samp/bin> ./amqsget TEST TEST.QM
Sample AMQSGET0 start
message <HELLO WORLD on NODE1>
<now wait 15 seconds>
no more messages
Sample AMQSGET0 end

  1. Delete the test queue created in Step 1.

mqm@node1:/opt/mqm/samp/bin> runmqsc TEST.QM
5724-B41 © Copyright IBM Corp. 1994, 2002. ALL RIGHTS RESERVED.
Starting MQSC for queue manager TEST.QM.

delete qlocal(TEST)
   1 : delete qlocal(TEST)
MQ8007: WebSphere MQ queue deleted.
end
   2 : end
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.

Feedback

Thanks for your feedback.

Post your comment on this topic.

Post Comment