Lab HYI9511
1WwbskN
1WwbskN
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Lab</strong> <strong>HYI9511</strong><br />
IBM MQ V8: Implementing Overlapping<br />
Clusters<br />
z
February 2016 edition<br />
NOTICES<br />
This information was developed for products and services offered in the USA.<br />
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM<br />
representative for information on the products and services currently available in your area. Any reference to an IBM product, program,<br />
or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent<br />
product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's<br />
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.<br />
IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this<br />
document does not grant you any license to these patents. You can send license inquiries, in writing, to:<br />
IBM Director of Licensing<br />
IBM Corporation<br />
North Castle Drive, MD-NC119<br />
Armonk, NY 10504-1785<br />
United States of America<br />
The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local<br />
law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF<br />
ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF<br />
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of<br />
express or implied warranties in certain transactions, therefore, this statement may not apply to you.<br />
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein;<br />
these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s)<br />
and/or the program(s) described in this publication at any time without notice.<br />
Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an<br />
endorsement of those websites. The materials at those websites are not part of the materials for this IBM product and use of those<br />
websites is at your own risk.<br />
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.<br />
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other<br />
publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other<br />
claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those<br />
products.<br />
This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible,<br />
the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to<br />
the names and addresses used by an actual business enterprise is entirely coincidental.<br />
TRADEMARKS<br />
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., registered in many<br />
jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM<br />
trademarks is available on the web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml.<br />
Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems<br />
Incorporated in the United States, and/or other countries.<br />
Cell Broadband Engine is a trademark of Sony Computer Entertainment, Inc. in the United States, other countries, or both and is used<br />
under license therefrom.<br />
Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and<br />
Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.<br />
IT Infrastructure Library is a Registered Trade Mark of AXELOS Limited.<br />
ITIL is a Registered Trade Mark of AXELOS Limited.<br />
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.<br />
Linear Tape-Open, LTO, the LTO Logo, Ultrium, and the Ultrium logo are trademarks of HP, IBM Corp. and Quantum in the U.S. and<br />
other countries.<br />
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.<br />
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries,<br />
or both.<br />
UNIX is a registered trademark of The Open Group in the United States and other countries.<br />
© Copyright International Business Machines Corporation 2016.<br />
This document may not be reproduced in whole or in part without the prior written permission of IBM.<br />
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Contents<br />
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br />
Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2<br />
Creating the cluster queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4<br />
Enabling the automatic creation of transmission queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6<br />
Creating an overlapping cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10<br />
Putting messages across the clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />
© Copyright IBM Corp. 2016 iii<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Contents<br />
iv<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.<br />
© Copyright IBM Corp. 2016
Introduction<br />
In this lab, you construct an IBM MQ cluster that uses multiple transmission queues to separate the<br />
workload. You then add more complexity by creating overlapping clusters that share full repository<br />
queue managers.<br />
In Part 1 of this exercise, you start the queue managers and cluster, create the cluster queues, and<br />
configure an existing cluster to use multiple transmission queues.<br />
In Part 2 of this exercise, you update the cluster to use multiple transmission queues. You also use<br />
the dspmqrte command to verify that the messages are routed through the dynamically created<br />
transmission queue.<br />
In Part 3 of this exercise, you create overlapping clusters that share a full repository queue<br />
manager.<br />
In Part 4 of this exercise, you configure the cluster so that you can put messages across the<br />
clusters.<br />
After completing this exercise, you should be able to:<br />
• Use multiple transmission queues to separate the workload<br />
• Use the IBM MQ display route command (dspmqrte) to verify the transmission queues<br />
• Create overlapping clusters<br />
This lab is taken from the three-day IBM course WM252, Designing, Implementing, and Managing<br />
IBM MQ V8 Clusters.<br />
The estimated time for this lab is 1.5 hours.<br />
Log in to the VMware image for this lab by using the following credentials:<br />
User name: Administrator<br />
Password: web1sphere<br />
Attention: This lab assumes that you have basic experience with IBM MQ system administration<br />
on distributed operating systems and IBM MQ Explorer.<br />
© Copyright IBM Corp. 2016 1<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercise<br />
Exercise<br />
In this exercise, you use a cluster that is named CLUS1. The cluster, queue managers, and<br />
channels are already configured for you in the VMWare image for this lab exercise.<br />
The cluster components for this exercise are shown in the figure below.<br />
Cluster = CLUS1<br />
QMC3 (9013)<br />
SALES<br />
CLUS1.QMC1<br />
QMC1 (9011)<br />
Full repository<br />
QMC4 (9014)<br />
CLUS1.QMC2<br />
MARKETING<br />
CLUS1.QMC2<br />
QMC5 (9015)<br />
QMC2 (9016)<br />
CLUS1.QMC1<br />
MARKETING<br />
CLUS1.QMC2<br />
Full repository<br />
Manually defined cluster-sender channels<br />
The cluster contains the following queue managers:<br />
• QMC1 is a full repository queue manager that is listening on port 9011<br />
• QMC2 is a full repository queue manager that is listening on port 9012<br />
• QMC3 is a partial repository queue manager that is listening on port 9013 and uses QMC1 for<br />
its full repository<br />
• QMC4 is a partial repository queue manager that is listening on port 9014 and uses QMC2 for<br />
its full repository<br />
• QMC5 is a partial repository queue manager that is listening on port 9015 and uses QMC2 for<br />
its full repository.<br />
2<br />
© Copyright IBM Corp. 2016<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V7.0<br />
Exercise<br />
Uempty<br />
In this lab, you use the IBM MQ Put sample program, amqsput, to represent two applications, which<br />
are identified in this exercise as SALES and MARKETING. A different clustered queue is used for<br />
each application.<br />
• The application SALES puts to a queue that is named SALES.<br />
• The application MARKETING puts to a queue that is named MARKETING<br />
© Copyright IBM Corp. 2016 3<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercise<br />
Task 1<br />
Creating the cluster queues<br />
In this part of the exercise, you start the queue managers and cluster, create the cluster queues,<br />
and configure an existing cluster to use multiple transmission queues.<br />
1. Start IBM MQ Explorer by double-clicking the WebSphere MQ Explorer shortcut icon.<br />
2. Stop the queue managers in the PubSubCluster<strong>Lab</strong> queue manager set by right-clicking<br />
PubSubCluster<strong>Lab</strong> queue manager set in the MQ Explorer - Navigator view, and then<br />
clicking Stop Local Queue Managers.<br />
3. The queue managers for this lab are defined in the queue manager set that is named<br />
OverlappingClusters<strong>Lab</strong>.<br />
Start the queue managers in the OverlappingClusters<strong>Lab</strong> queue manager set by right-clicking<br />
OverlappingClusters<strong>Lab</strong> in the MQ Explorer - Navigator view, and then clicking Start Local<br />
Queue Managers. Click OK to start the queue managers as created.<br />
4. Verify that the queue managers, listeners, and channels are running on QMC1, QMC2, QMC3,<br />
and QMC4.<br />
Attention: It might take a minute or two for the IBM MQ Explorer to update and show that the<br />
queue managers and cluster are active.<br />
4<br />
© Copyright IBM Corp. 2016<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V7.0<br />
Exercise<br />
Uempty<br />
5. This exercise requires a cluster-queue that is named SALES on QMC3 and MARKETING on<br />
QMC4 and QMC5.<br />
a. Add the SALES cluster queue to QMC3.<br />
Using runmqsc for QMC3, type:<br />
DEFINE QL(SALES) CLUSTER(CLUS1) DEFBIND(NOTFIXED)<br />
b. Add the MARKETING cluster queue to QMC4.<br />
Using runmqsc for QMC4, type:<br />
DEFINE QL(MARKETING) CLUSTER(CLUS1) DEFBIND(NOTFIXED)<br />
c. Add the MARKETING cluster queue to QMC5.<br />
Using runmqsc for QMC5, type:<br />
DEFINE QL(MARKETING) CLUSTER(CLUS1) DEFBIND(NOTFIXED)<br />
Attention: Ensure that the listeners and channels are running before you continue. If a queue<br />
manager cannot communicate with other queue managers in the cluster, you might encounter<br />
errors in subsequent steps, such as the reason code 2085: MQRC_UNKNOWN_OBJECT_NAME.<br />
6. In a command window, use the Put sample amqsput to test the cluster.<br />
Send messages to the SALES and MARKETING cluster queues from the queue managers that<br />
are called QMC1 and QMC2.<br />
To send a message by using the amsput command, enter some text, such as “Hello World”, and<br />
press Enter. To end the application when you finished sending requests, press Enter without<br />
entering any text beforehand.<br />
a. Send messages to the SALES queue from QMC1. Run the following command:<br />
amqsput SALES QMC1<br />
b. Send messages to the MARKETING queue from QMC1. Run the following command:<br />
amqsput MARKETING QMC1<br />
c. Send messages to the SALES queue from QMC2. Run the following command:<br />
amqsput SALES QMC2<br />
d. Send messages to the MARKETING queue from QMC2. Run the following command:<br />
amqsput MARKETING QMC2<br />
7. Use IBM MQ Explorer to confirm that messages were delivered correctly.<br />
8. After you examine the messages, use IBM MQ Explorer to clear the SALES and MARKETING<br />
queues. Clearing the queues makes it easier to determine the outcome of subsequent steps<br />
that rerun the amqsput sample program.<br />
© Copyright IBM Corp. 2016 5<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercise<br />
Task 2<br />
Enabling the automatic creation of transmission<br />
queues<br />
Now that you have created and verified the initial cluster configuration, you can update the cluster<br />
to use multiple transmission queues. Messages are sent only from queue manager QMC1 and<br />
QM2, so these managers are the only queue managers that must be updated.<br />
1. Modify QMC1 and QMC2 to automatically define a permanent-dynamic queue for the cluster<br />
sender channel. This queue has the name SYSTEM.CLUSTER.TRANSMIT.ChannelName<br />
a. Using runmqsc for QMC1, type the following command:<br />
ALTER QMGR DEFCLXQ(CHANNEL)<br />
b. Using runmqsc for QMC2, type the following command:<br />
ALTER QMGR DEFCLXQ(CHANNEL)<br />
2. You must restart each cluster-sender channel that sends application messages on QMC1 and<br />
QMC2 for the configuration change to become effective.<br />
a. Using runmqsc for QMC1, type the following commands:<br />
STOP CHANNEL(CLUS1.QMC3)<br />
STOP CHANNEL(CLUS1.QMC4)<br />
STOP CHANNEL(CLUS1.QMC5)<br />
START CHANNEL(CLUS1.QMC3)<br />
START CHANNEL(CLUS1.QMC4)<br />
START CHANNEL(CLUS1.QMC5)<br />
b. Run the same commands for QMC2 to stop and start the cluster-sender channels.<br />
Attention: In Part 1 of this exercise, the cluster configuration was verified by sending messages.<br />
If you did not put several messages (at least 10), a channel might not be created between every<br />
pair of queue managers. When you try to stop the channels, one or more of the commands might<br />
fail because the channel does not exist. Ignore this error; when a channel is created, it recognizes<br />
the value of the DEFCLXQ attribute.<br />
3. Confirm the use of multiple cluster transmission queues by displaying the status of the<br />
cluster-sender channels.<br />
a. Using runmqsc for QMC1, type<br />
DISPLAY CHSTATUS(*) WHERE(CHLTYPE EQ CLUSSDR)<br />
6<br />
© Copyright IBM Corp. 2016<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V7.0<br />
Exercise<br />
Uempty<br />
This command should return results that are similar to the following example.<br />
1 : DISPLAY CHSTATUS(*) WHERE(CHLTYPE EQ CLUSSDR)<br />
AMQ8417: Display Channel Status details.<br />
CHANNEL(CLUS1.QMC2) CHLTYPE(CLUSSDR)<br />
CONNAME(127.0.0.1(9012)) CURRENT<br />
RQMNAME(QMC2)<br />
STATUS(RUNNING)<br />
SUBSTATE(MQGET)<br />
XMITQ(SYSTEM.CLUSTER.TRANSMIT.QUEUE)<br />
AMQ8417: Display Channel Status details.<br />
CHANNEL(CLUS1.QMC3) CHLTYPE(CLUSSDR)<br />
CONNAME(127.0.0.1(9013)) CURRENT<br />
RQMNAME(QMC3)<br />
STATUS(RUNNING)<br />
SUBSTATE(MQGET)<br />
XMITQ(SYSTEM.CLUSTER.TRANSMIT.CLUS1.QMC3)<br />
AMQ8417: Display Channel Status details.<br />
CHANNEL(CLUS1.QMC4) CHLTYPE(CLUSSDR)<br />
CONNAME(127.0.0.1(9014)) CURRENT<br />
RQMNAME(QMC4)<br />
STATUS(RUNNING)<br />
SUBSTATE(MQGET)<br />
XMITQ(SYSTEM.CLUSTER.TRANSMIT.CLUS1.QMC4)<br />
AMQ8417: Display Channel Status details.<br />
CHANNEL(CLUS1.QMC5) CHLTYPE(CLUSSDR)<br />
CONNAME(127.0.0.1(9015)) CURRENT<br />
RQMNAME(QMC5)<br />
STATUS(RUNNING)<br />
SUBSTATE(MQGET)<br />
XMITQ(SYSTEM.CLUSTER.TRANSMIT.CLUS1.QMC5)<br />
When the status information for active channels is displayed, the XMITQ attribute identifies<br />
the transmission queue that is each channel uses.<br />
The example shows that the channels CLUS1.QMC3, CLUS1.QMC4, and CLUS1.QMC5<br />
are using a dynamically created transmission queue. In the example, CLUS1.QMC2 is still<br />
using the SYSTEM.CLUSTER.TRANSMIT.QUEUE transmission queue because it was not<br />
restarted.<br />
b. Using runmqsc for QMC2, verify that the cluster-sender channels are using the dynamically<br />
created transmission queues. Type:<br />
DISPLAY CHSTATUS(*) WHERE(CHLTYPE EQ CLUSSDR)<br />
4. To ensure that messages are still delivered correctly within the cluster, put several messages to<br />
the queues SALES and MARKETING by using the amqsput command. Use IBM MQ Explorer to<br />
confirm that messages were delivered correctly.<br />
a. Send messages to the SALES queue from QMC1. Run the following command:<br />
amqsput SALES QMC1<br />
b. Send messages to the MARKETING queue from QMC1. Run the following command:<br />
amqsput MARKETING QMC1<br />
© Copyright IBM Corp. 2016 7<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercise<br />
c. Send messages to the SALES queue from QMC2. Run the following command:<br />
amqsput SALES QMC2<br />
d. Send messages to the MARKETING queue from QMC2. Run the following command:<br />
amqsput MARKETING QMC2<br />
5. To verify that messages were routed through the dynamically created transmission queues, run<br />
the dspmqrte command and examine the results. Type:<br />
dspmqrte -m QMC1 -q MARKETING -ac -v outline<br />
The dspmqrte program should return results similar to the following example, which shows that<br />
the message was put on the SYSTEM.CLUSTER.TRANSMIT.CLUS1.QMC4 queue.<br />
AMQ8653: DSPMQRTE command started with options '-m QMC1 -q MARKETING -ac -v<br />
outline'.<br />
AMQ8659: DSPMQRTE command successfully put a message on queue<br />
'SYSTEM.CLUSTER.TRANSMIT.CLUS1.QMC4', queue manager 'QMC1'.<br />
AMQ8674: DSPMQRTE command is now waiting for information to display.<br />
-------------------------------------------------------------------------<br />
Activity:<br />
ApplName: 'Sphere MQ\bin64\dspmqrte.exe'<br />
Operation:<br />
OperationType: Put<br />
QMgrName: 'QMC1<br />
'<br />
QName: 'MARKETING<br />
'<br />
ResolvedQName: 'SYSTEM.CLUSTER.TRANSMIT.CLUS1.QMC4<br />
'<br />
RemoteQName: 'MARKETING<br />
'<br />
RemoteQMgrName: 'QMC4<br />
'<br />
-------------------------------------------------------------------------<br />
Activity:<br />
ApplName: 'Sphere MQ\bin64\amqrmppa.exe'<br />
Operation:<br />
OperationType: Get<br />
QMgrName: 'QMC1<br />
QName: 'SYSTEM.CLUSTER.TRANSMIT.CLUS1.QMC4<br />
ResolvedQName: 'SYSTEM.CLUSTER.TRANSMIT.CLUS1.QMC4<br />
'<br />
'<br />
'<br />
Operation:<br />
OperationType: Send<br />
QMgrName: 'QMC1<br />
RemoteQMgrName: 'QMC4<br />
ChannelName: 'CLUS1.QMC4<br />
'<br />
ChannelType: ClusSdr<br />
XmitQName: 'SYSTEM.CLUSTER.TRANSMIT.CLUS1.QMC4<br />
'<br />
'<br />
'<br />
8<br />
© Copyright IBM Corp. 2016<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V7.0<br />
Exercise<br />
Uempty<br />
-------------------------------------------------------------------------<br />
Activity:<br />
ApplName: 'Sphere MQ\bin64\amqrmppa.exe'<br />
Operation:<br />
OperationType: Receive<br />
QMgrName: 'QMC4<br />
RemoteQMgrName: 'QMC1<br />
ChannelName: 'CLUS1.QMC4<br />
ChannelType: ClusRcvr<br />
'<br />
'<br />
'<br />
Operation:<br />
OperationType: Discard<br />
QMgrName: 'QMC4<br />
'<br />
QName: 'MARKETING<br />
'<br />
Feedback: NotDelivered<br />
-------------------------------------------------------------------------<br />
AMQ8652: DSPMQRTE command has finished.<br />
6. Two queue managers in the cluster (QMC4 and QMC5) contain the MARKETING cluster<br />
queue.<br />
Run the dspmqrte command again and verify that this time the message is routed to the<br />
transmission queue for the other queue manager.<br />
For example, if the first dspmqrte command shows that the message is routed to QMC4 on<br />
SYSTEM.CLUSTER.TRANSMIT.CLUS.QMC4 then the second dspmqrte command should<br />
show that the message is routed to QMC5 on SYSTEM.CLUSTER.TRANSMIT.CLUS.QMC5.<br />
7. After you examine the messages, use IBM MQ Explorer to clear the SALES and MARKETING<br />
queues on QMC3, QMC4, and QMC5.<br />
Clearing the queues makes it easier to determine the outcome of subsequent steps that rerun<br />
the amqsput sample program.<br />
© Copyright IBM Corp. 2016 9<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercise<br />
Task 3<br />
Creating an overlapping cluster<br />
In this part of the exercise, you create a new cluster that is named CLUS2. As shown in the figure,<br />
CLUS2 uses the full repository queue managers from CLUS1 (QMC1 and QMC2) and two new<br />
partial repository queue managers that are named QMCA and QMCB.<br />
In this part of the exercise, the amqsput sample program is used to send messages to a queue that<br />
is called ACCOUNTING, which is on QMCA and QMCB.<br />
CLUS1<br />
QMC3 (9013) QMC1 (9011)<br />
CLUS1.QMC1<br />
CLUS2<br />
CLUS2.QMC1<br />
QMCA (9016)<br />
SALES<br />
CLUS1.QMC1<br />
CLUS1.QMC3<br />
NAMELIST(CLUSTER) +<br />
NAMES(CLUS1,CLUS2)<br />
ALTER QMGR REPOSNL(CLUSTER)<br />
CLUS2.QMC1<br />
CLUS2.QMCA<br />
ACCOUNTING<br />
QMC4 (9014)<br />
CLUS1.QMC2<br />
CLUS2.QMC2<br />
MARKETING<br />
CLUS1.QMC2<br />
CLUS1.QMC4<br />
QMC5 (9015)<br />
CLUS1.QMC2<br />
CLUS1.QMC1<br />
QMC2 (9012)<br />
CLUS2.QMC1<br />
CLUS2.QMC2<br />
QMCB (9017)<br />
MARKETING<br />
CLUS1.QMC2<br />
CLUS1.QMC4<br />
NAMELIST(CLUSTER) +<br />
NAMES(CLUS1,CLUS2)<br />
ALTER QMGR REPOSNL(CLUSTER)<br />
CLUS2.QMC2<br />
CLUS2.QMCB<br />
ACCOUNTING<br />
Manually defined channels<br />
In this part of the exercise, you revise the configuration to add the following objects:<br />
QMC1<br />
• Cluster-receiver channel for CLUS2<br />
• Cluster-sender channel to QMC2 for CLUS2<br />
• Repository for CLUS1 and CLUS2<br />
QMC2<br />
• Cluster-receiver channel for CLUS2<br />
• Cluster-sender channel to QMC1 for CLUS2<br />
• Repository for CLUS1 and CLUS2<br />
10<br />
© Copyright IBM Corp. 2016<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V7.0<br />
Exercise<br />
Uempty<br />
QMCA<br />
• Listener on 9016<br />
• Cluster-receiver channel for CLUS2<br />
• Cluster-sender channel to QMC1 for CLUS2<br />
• Local queue that is called ACCOUNTING for CLUS2<br />
QMCB<br />
• Listener on 9017<br />
• Cluster-receiver channel for CLUS2<br />
• Cluster-sender channel to QMC2 for CLUS2<br />
• Local queue that is called ACCOUNTING for CLUS2<br />
1. Using IBM MQ Explorer, create the queue managers QMCA (on 9016) and QMCB (on 9017).<br />
2. After you create the queue managers, verify that the listeners are running.<br />
3. Configure the queue managers to be full repositories for CLUS1 and CLUS2.<br />
a. Using runmqsc for QMC1, type:<br />
DEFINE NAMELIST(CLUSTER) NAMES(CLUS1, CLUS2)<br />
ALTER QMGR REPOS(' ') REPOSNL(CLUSTER)<br />
b. Using runmqsc for QMC2, type:<br />
DEFINE NAMELIST(CLUSTER) NAMES(CLUS1, CLUS2)<br />
ALTER QMGR REPOS(' ') REPOSNL(CLUSTER)<br />
4. Configure the channels between the queue managers in cluster CLUS2.<br />
a. Using runmqsc for QMC1, type:<br />
DEFINE CHANNEL(CLUS2.QMC1) CHLTYPE(CLUSRCVR) +<br />
TRPTYPE(TCP) CONNAME('localhost(9011)') CLUSTER(CLUS2)<br />
DEFINE CHANNEL(CLUS2.QMC2) CHLTYPE(CLUSSDR) +<br />
TRPTYPE(TCP) CONNAME('localhost(9012)') CLUSTER(CLUS2)<br />
b. Using runmqsc for QMC2, type:<br />
DEFINE CHANNEL(CLUS2.QMC2) CHLTYPE(CLUSRCVR) +<br />
TRPTYPE(TCP) CONNAME('localhost(9012)') CLUSTER(CLUS2)<br />
DEFINE CHANNEL(CLUS2.QMC1) CHLTYPE(CLUSSDR) +<br />
TRPTYPE(TCP) CONNAME('localhost(9011)') CLUSTER(CLUS2)<br />
c. Using runmqsc for QMCA, type:<br />
DEFINE CHANNEL(CLUS2.QMCA) CHLTYPE(CLUSRCVR) +<br />
TRPTYPE(TCP) CONNAME('localhost(9016)') CLUSTER(CLUS2)<br />
DEFINE CHANNEL(CLUS2.QMC1) CHLTYPE(CLUSSDR) +<br />
TRPTYPE(TCP) CONNAME('localhost(9011)') CLUSTER(CLUS2)<br />
© Copyright IBM Corp. 2016 11<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercise<br />
d. Using runmqsc for QMCB, type:<br />
DEFINE CHANNEL(CLUS2.QMCB) CHLTYPE(CLUSRCVR) +<br />
TRPTYPE(TCP) CONNAME('localhost(9017)') CLUSTER(CLUS2)<br />
DEFINE CHANNEL(CLUS2.QMC2) CHLTYPE(CLUSSDR) +<br />
TRPTYPE(TCP) CONNAME('localhost(9012)') CLUSTER(CLUS2)<br />
5. Add the queue ACCOUNTING to the partial repositories (QMCA and QMCB) in CLUS2.<br />
Using runmqsc for QMCA and QMCB, type the following command:<br />
DEFINE QL(ACCOUNTING) CLUSTER(CLUS2) DEFBIND(NOTFIXED)<br />
6. Check that the cluster changes that you created with the previous steps are propagated though<br />
the cluster.<br />
a. Using runmqsc for QMC1 (a full repository queue manager), type the following command<br />
and examine the results.<br />
DIS CLUSQMGR(*)<br />
You should see that there are two entries for QMC1 and QMC2: one entry for CLUS1 and<br />
one entry for CLUS2. You should also see the two new partial repository queue managers<br />
for CLUS2 (QMCA and QMCB).<br />
b. Using runmqsc for QMC1, type the following command to verify that the ACCOUNTING<br />
cluster queue is defined correctly on QMCA and QMCB.<br />
DIS QCLUSTER(ACCOUNTING)<br />
c. View the cluster in IBM MQ Explorer. You should now see two clusters (CLUS1 and<br />
CLUS2). QMC1 and QMC2 should be listed as full repository queue managers for both<br />
clusters.<br />
12<br />
© Copyright IBM Corp. 2016<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V7.0<br />
Exercise<br />
Uempty<br />
7. Use amqsput sample program on QMC1 and QMC2 to put messages to the ACCOUNTING<br />
cluster queue on QMCA and QMCB.<br />
Examples:<br />
amqsput ACCOUNTING QMC1<br />
amqsput ACCOUNTING QMC2<br />
8. Use IBM MQ Explorer to verify that the messages arrived on QMCA and QMCB, which confirms<br />
that working cluster exists.<br />
Task 4<br />
Putting messages across the clusters<br />
In this part of the exercise configure the cluster so that queues can be referenced in both clusters.<br />
First you create a cluster queue on QMC1 that is shared by both CLUS1 and CLUS2.<br />
Next, you create a queue alias so that you can put a message from QMCA on CLUS2 to the SALES<br />
queue on QMC3 in CLUS1.<br />
1. Create a cluster queue that is named SHAREQ on QMC1 that is shared in both clusters.<br />
Using runmqsc for QMC1, type:<br />
DEF QL(SHAREQ) CLUSNL(CLUSTER)<br />
2. Verify that you can put messages to SHAREQ by using the amqsput sample program.<br />
a. To verify that you can put to SHAREQ from a queue manager that is in CLUS1, type:<br />
amqsput SHAREQ QMC3<br />
b. To verify that you can put to SHAREQ from a queue manager that is in CLUS2, type:<br />
ampsput SHAREQ QMCA<br />
3. On QMC1 (a bridge queue manager), create a queue alias so that you can put a message from<br />
QMCA on CLUS2 to the SALES queue on QMC3 in CLUS1.<br />
On QMC1, create an queue alias that is named MYSALES that targets the SALES queue on<br />
QMC3 and shares it with CLUS2. Type:<br />
DEF QA(MYSALES) TARGQ(SALES) CLUSTER(CLUS2) DEFBIND(NOTFIXED)<br />
Attention: When you open a queue, you need to set DEFBIND to either NOTFIXED or QDEF. If<br />
DEFBIND is left as the default, OPEN, the queue manager resolves the alias definition to the bridge<br />
queue manager that hosts it. The bridge does not forward the message.<br />
4. Verify that you can put a message from QMCA in CLUS2 to QMC3 in CLUS1 by using the alias<br />
queue MYSALES. Type:<br />
amqsput MYSALES QMCA<br />
© Copyright IBM Corp. 2016 13<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercise<br />
5. Using IBM MQ Explorer, verify that the message that you typed in Step 4 is on the SALES<br />
queue on QMC3.<br />
Exercise clean-up<br />
Using IBM MQ Explorer, stop the queue manager set OverlappingClusters<strong>Lab</strong>.<br />
End of exercise<br />
14<br />
© Copyright IBM Corp. 2016<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V7.0<br />
Exercise<br />
Uempty<br />
Exercise review and wrap-up<br />
In this exercise, you:<br />
• Configured a cluster to use multiple transmission queues to separate the workload.<br />
• Use the dspmqrte command to verify the transmission queues.<br />
• Created and tested an overlapping cluster<br />
© Copyright IBM Corp. 2016 15<br />
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Highlights<br />
<br />
<br />
<br />
<br />
<br />
Align skills with personal and business<br />
goals<br />
Technology advances at an accelerated pace, from frequent innovaons<br />
in Soware and Hardware to the rapid emergence of<br />
technical soluons. Organizaons and their staff must keep<br />
pace, staying compeve and driving faster return on investment<br />
(ROI) through enablement and engagement ed to<br />
business outcomes. Companies today need a learning strategy<br />
that’s economical, scalable and flexible, and — above all — effec-<br />
ve.<br />
World–class IBM content, worldwide<br />
delivery<br />
A recognized skills leader, IBM Training has evolved to ensure<br />
technology soluons relate to your personal goals and the<br />
needs of the business. IBM authorized content is current,<br />
accurate, reliable and consistent, whether off–the– shelf or<br />
custom designed. When delivered by a handful of specially<br />
chosen Global Training Providers with a vast network of loca-<br />
ons and innovave delivery methods, we take learning to<br />
the next level with an end–to–end training soluon.<br />
Drive business success with the experts<br />
IBM–selected, expert skills providers offer a superior value<br />
versus other training opons. They offer personalized services<br />
and guidance, from charng a career path and planning<br />
for cerficaon to choosing courses and the best format for<br />
an individual or the full enterprise. With more locaons and a<br />
higher volume of course offerings, building skills and contribu-<br />
ng to the success of the organizaon is more convenient.<br />
Connect with your Global Training Provider:<br />
<br />
To learn more, visit:
V7.0<br />
Uempty
z