Chapter 6. Peer-to-peer Q replication on AIX platforms 561
6.5.5 Step 5: Configure WebSphere MQ
Several WebSphere MQ objects need to be created in support of Q replication,
and configured to suit an organization’s particular workload. The WebSphere MQ
objects are:
򐂰 Queue Manager
򐂰 Channels
򐂰 Local queues
򐂰 Remote queues
There is a hierarchical relationship between these objects—the Queue Manager
is created at the highest level, and all objects are managed by the Queue
Manager.
To support a typical Q replication bidirectional setup, the following objects must
be defined on each system:
򐂰 Queue Manager
򐂰 Sender channel
򐂰 Receiver channel
򐂰 Transmit queue (local)
򐂰 Capture administration queue (local)
򐂰 Capture restart queue (local)
򐂰 Capture send queue (remote)
򐂰 Apply receive queue (local)
򐂰 Apply spill queue (local model)
򐂰 Apply administration queue (remote)
After configuring the WebSphere MQ objects, we verified its success by testing
the put and get messages from the local and remote queues.
Configure WebSphere MQ objects
Example 6-15 is the script for creating all the WebSphere MQ objects necessary
for peer-to-peer replication on node PEER1 (Jamesbay), while Example 6-16 on
page 565 is the script for creating the objects on node PEER2 (Azov).
Note: Local refers to the fact that the queue is defined as a local queue on the
system, while
remote refers to the fact that the queue is defined as a remote
queue.
Important: The scripts should be run by a member of the mqm group.
562 WebSphere Information Integrator Q Replication: Fast Track Implementation Scenarios
Example 6-15 Create necessary MQ objects for peer-to-peer replication on PEER1
#################################################################
# Set up the PEER1 server
#################################################################
#
# This section ensures that any existing MQ listener and Queue
# Manager are stopped and deleted before attempting to recreate
# them in the secions below.
#
# Uncomment the following lines if you wish to run this script
# to recreate all objects, after an initial run
#endmqm QM_PEER1
#sleep 30
#endmqlsr
#sleep 20
#dltmqm QM_PEER1
#######################################################################
# 1) Create the Queue Manager on PEER1 (do not make it the default QM)
#######################################################################
##Queue Manager reference A.11
crtmqm QM_PEER1
#######################################################################
# 2) Start the Queue Manager on PEER1
#######################################################################
##Queue Manager reference A.11
strmqm QM_PEER1
#######################################################################
# 3) Start a WebSphere MQ listener
#######################################################################
##WebSphere MQ listener port reference A.12
runmqlsr -m QM_PEER1 -t tcp -p 1421 &
#######################################################################
# 4) Create the queue/channel objects
#######################################################################
##Local AdminQ reference A.17
##Local AdminQ MAXMSGL reference A.17a
Note: The values for the names of the WebSphere MQ objects and the
configuration parameters are substituted from the templates listed in Table 6-1
on page 549, Table 6-2 on page 550, and Table 6-3 on page 552. The specific
references are listed in the script.
Chapter 6. Peer-to-peer Q replication on AIX platforms 563
##Local AdminQ MAXDEPTH reference A.17b
runmqsc QM_PEER1 <<!
DEFINE QLOCAL(PEER1_ADMINQ) +
REPLACE +
DESCR('LOCAL DEFN OF ADMINQ FOR PEER1 CAPTURE') +
PUT(ENABLED) +
GET(ENABLED) +
DEFPSIST(YES) +
MAXMSGL(4194403) +
MAXDEPTH(5000)
##
##Local RestartQ reference A.16
##Local RestartQ MAXMSGL reference A.16a
##Local RestartQ MAXDEPTH reference A.16b
DEFINE QLOCAL(PEER1_RESTARTQ) +
REPLACE +
DESCR('LOCAL DEFN OF RESTARTQ FOR PEER1 CAPTURE') +
PUT(ENABLED) +
GET(ENABLED) +
DEFPSIST(YES) +
MAXMSGL(4194403) +
MAXDEPTH(5000)
##
##Local SpillQ reference A.20
##Local SpillQ MAXMSGL reference A.20a
##Local SpillQ MAXDEPTH reference A.20b
DEFINE QMODEL(IBMQREP.SPILL.MODELQ) +
REPLACE +
DEFSOPT(SHARED) +
MAXDEPTH(500000) +
MSGDLVSQ(FIFO) +
DEFTYPE(PERMDYN) +
MAXMSGL(100000)
##
##Remote SendQ QREMOTE reference A.18
##Remote SendQ XMITQ reference A.18a
##Remote SendQ RNAME reference A.18b
##Remote SendQ RQMNAME reference A.18c
DEFINE QREMOTE(PEER1_TO_PEER2_Q) +
REPLACE +
DESCR('REMOTE DEFN OF SEND QUEUE FROM PEER1 TO PEER2') +
PUT(ENABLED) +
XMITQ(QM_PEER2) +
564 WebSphere Information Integrator Q Replication: Fast Track Implementation Scenarios
RNAME(PEER1_TO_PEER2_Q) +
RQMNAME(QM_PEER2) +
DEFPSIST(YES)
##
##Local ReceiveQ QLOCAL reference A.19
##Local ReceiveQ MAXMSGL reference A.19a
##Local ReceiveQ MAXDEPTH reference A.19b
DEFINE QLOCAL(PEER2_TO_PEER1_Q) +
REPLACE +
DESCR('LOCAL RECEIVE QUEUE FOR PEER1 FROM PEER2') +
GET(ENABLED) +
SHARE +
DEFPSIST(YES) +
MSGDLVSQ(PRIORITY) +
MAXMSGL(4194403) +
MAXDEPTH(5000)
##
##Remote AdminQ QREMOTE reference A.21
##Remote AdminQ XMITQ reference A.21a
##Remote AdminQ RNAME reference A.21b
##Remote AdminQ RQMNAME reference A.21c
DEFINE QREMOTE(PEER2_ADMINQ) +
REPLACE +
DESCR('REMOTE DEFN OF ADMINQ FOR PEER2 CAPTURE') +
PUT(ENABLED) +
XMITQ(QM_PEER2) +
RNAME(PEER2_ADMINQ) +
RQMNAME(QM_PEER2) +
DEFPSIST(YES)
##
##Local TransmitQ QLOCAL reference A.13
##Local TransmitQ TRIGDATA reference A.13a
##Local TransmitQ INITQ reference A.13b
##Local TransmitQ MAXMSGL reference A.13c
##Local TransmitQ MAXDEPTH reference A.13d
DEFINE QLOCAL(QM_PEER2) +
REPLACE +
DESCR('TRANSMISSION QUEUE TO PEER2') +
USAGE(XMITQ) +
DEFPSIST(YES) +
TRIGGER +
TRIGTYPE(FIRST) +
TRIGDATA(PEER1_TO_PEER2) +
INITQ(SYSTEM.CHANNEL.INITQ) +
MAXMSGL(4194403) +
MAXDEPTH(5000)
Chapter 6. Peer-to-peer Q replication on AIX platforms 565
##
##Local SDR channel CHANNEL reference A.14
##Local SDR channel TRPTYPE reference A.14a
##Local SDR channel XMITQ reference A.14b
##Local SDR channel CONNAME reference A.14c
##Local SDR channel HBINT reference A.14d
DEFINE CHANNEL(PEER1_TO_PEER2) +
CHLTYPE(SDR) +
REPLACE +
TRPTYPE(TCP) +
DESCR('SENDER CHANNEL TO PEER2') +
XMITQ(QM_PEER2) +
CONNAME('9.1.39.89(1420)') +
HBINT(300)
##
##Local RCV channel CHANNEL reference A.15
##Local RCV channel TRPTYPE reference A.15a
##Local RCV channel HBINT reference A.15b
DEFINE CHANNEL(PEER2_TO_PEER1) +
CHLTYPE(RCVR) +
REPLACE +
TRPTYPE(TCP) +
DESCR('RECEIVER CHANNEL FROM PEER2') +
HBINT(300)
##
##MAXUMSGS reference A.11b
##MAXMSGL reference A.11c
ALTER QMGR +
MAXUMSGS(10000) +
MAXMSGL(4194403)
!
# END OF SCRIPT
Example 6-16 Create necessary MQ objects for peer-to-peer replication on PEER2
#################################################################
# Set up the PEER2 server
#################################################################
#
# This section ensures that any existing MQ listener and Queue
Note: The same listener port can be used on both host servers, but it may be
easier to debug if one uses a different port on each.

Get WebSphere Information Integrator Q Replication: Fast Track Implementation Scenarios now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.