messages from one queue manager to another. The receiving queue manager can be on the same machine or another; nearby or on the other side of the world. It can be running on the same platform as the local queue manager, or can be on any of the platforms supported by WMQ. This is called a distributed environment.
Introduction WMQ handles communication in a distributed environment such as this using Distributed Queue Management (DQM).
The local queue manager is sometimes called
the source queue manager and the remote queue manager is sometimes called the target queue manager or the partner queue manager.
How does distributed queuing work?
How does distributed queuing work?
Components needed to send a message.
Distributed queuing components
The components of distributed queuing are: Message channels Dead-letter queues Remote queue definitions
Distributed queuing components
Distributed queuing components
Message channels
Message channels are the channels that carry
messages from one queue manager to another. Types of channels Sender Receiver Server Requester Cluster sender Cluster receiver
Distributed queuing components
Message channels Channels works in following pairs Sender-receiver Requester-server Requester-sender (callback) Server-receiver Cluster sender-cluster receiver
Distributed queuing components
Message channel Agent
Message channel agent (MCA) is a program that
controls the sending and receiving of messages. There is one MCA at each end of a channel. One MCA takes messages from the transmission queue and puts them on the communication link. The other MCA receives messages and delivers them onto a queue on the remote queue manager.
Distributed queuing components
Sender-receiver channels Sender channel should have corresponding receiver channel on destination queue manager. Sender and receiver channel should have same name. MCA at sender channel side picks the message from transmission queue and send it across the channel. MCA at receiver channel side receives the message from receiver channel and place it on the destination queue.
Distributed queuing components
Sender-receiver channels
Distributed queuing setup
Transmission queue
Special type of local queue used to store
messages before they are transmitted by the MCA to the remote queue manager. In distributed-queuing environment, transmission queue need to be defined for each sending MCA. Sending channel/MCA picks message from this queue and sends it across to destination queue manager.
Distributed queuing setup
Transmission queue
Can be created by using DEFINE QLOCAL statement in
Ensure that queue specified with INITQ attribute exists
on queue manager. On z/OS , initiation queue name should be SYSTEM.CHANNEL.INITQ. This is recommended on other platforms also. Initiation queue is used to start the channel automatically.
Distributed queuing setup
Dead letter queue Also called undelivered-message queue. Dead letter queue is a local queue to which messages are sent if they cannot be routed to their correct destination. Messages are put on this queue when they cannot be put on the destination queue for some reason (eg:- queue does not exist, or queue is full, put inhibited for queue). Dead letter queue is associated with queue manager ALTER QMGR DEADQ(<Dead letter queue name>)
Distributed queuing setup
Remote queue Queues which are owned by another queue manager. Used to send messages to a queue located in a remote queue manager. Doesnt have memory associated with it. Stores the message in the associated transmission queue. Enables application to put message to a queue on a different queue manager than the queue manager to which it is connected.
Distributed queuing setup
Remote queue Remote queues are created using DEFINE QREMOTE statement in runmqsc prompt. DEFINE QREMOTE(<Remote queue name>) + RNAME(<name of remote queue name on remote qmgr>) + RQMGR(<Remote queue manager name>) + XMITQ(<Transmit queue name>)
Distributed queuing setup
Sender channel Defined on source queue manager. Channel with channel type as SENDER. Following are the mandatory parameters for sender channel The name of the transmission queue to be used (the XMITQ attribute). The connection name of the partner system (the CONNAME attribute). The name of the communication protocol you are using (the TRPTYPE attribute).
Distributed queuing setup
Sender channel Can be created by using DEFINE CHANNEL statement in runmqsc prompt. DEFINE CHANNEL(QM1.QM2) CHLTYPE(SENDER) + XMITQ(<transmit queue name >) + CONNAME(<IP of remote host>(<remote qmg port>)) Other channel properties will be inherited from default system channel SYSTEM.DEF.SENDER
Distributed queuing setup
Receiver channel
Exists on target queue manager.
Channel with channel type as RECEIVER. Channel name should be same as the sender channel name. Created using DEFINE CHANNEL on runmqsc prompt. DEFINE CHANNEL(QM1.QM2) CHLTYPE(RCVR) Once sender and receiver channels are created, channels should be started at both ends and it should be ensured that channels are running. START CHANNEL(QM1.QM2) DISPLAY CHSTATUS(QM1.QM2)
Distributed queuing setup
Destination queue
Exists on target queue manager.
Destination queue can be alias queue , local queue or remote queue belonging to another remote queue manager.