Sunday, January 19, 2014

Distributed Queue Management (DQM)

Distributed queueing means sending the business data(msgs) from one queue manager to another queue manager. The receiving queue manager could be the same machine or a remote one.

Consider tow sample qmgrs like QM1 and QM2:

Source queue manager: QM1
Remote queue definition 
Transmission queue definition
Sender channel definition

Destination queue manager: QM2
Local queue (r-name)
Receiver channel definition
Listener definition.

Configuration:
CRTMQM QM1
STRMQM QM1
RUNMQSC QM1
DEFINE QREMOTE(QM1.RQ1) RNAME(QM2.LQ1) RQMNAME(QM2) XMITQ(QM2.XMITQ)
DEF QL(QM2.XMITQ) USAGE(XMITQ)
DEF CHANNEL(QM1.QM2) CHLTYPE(SDR) CONNAME('HOSTNAME(PORT)') XMITQ(QM2.XMITQ)
START CHANNEL(QM1.QM2)
END
*******************************************************************************************************
CRTMQM QM2
STRMQM QM2
RUNMQSC QM2
DEFINE QLOCAL(QM2.LQ1)
DEF CHANNEL(QM1.QM2) CHLTYPE(RCVR) 
DEF LSTR(LSTR.TCP) PORT(1414) TRPTYPE(TCP)
STA LSTR(LSTR.TCP)
END

After completing the configuration, check the application connectivity using MQI put and get calls.

"amqsput" and "amqsget" is a sample programs to put and get the messages.

==>AMQSPUT QM1.RQ1 QM1 (put the input data)
(double enter: end the amqsput program)

==>AMQSGET QM2.LQ1 QM2 (get the output data)


Messages are sent from the transmission queue at the sender end, to destination queues at the receiver end.
1. The sender application put the business data in Remote queue.
2. The Remote queue dos't store any data, just it add the destination/target queue and queue manager details and put it into transmission queue.
3. Transmission queue is a type of local queue, it store the data temp,,
4. The sender MCA(messages channel agent) pick the data from transmission queue to keeps on SDR channel.
5. The receiver MCA pick the data from receiver channel and posted the target queue.
6. The destination application connected to the target queue and process the business data/messages.

2 comments: