Distributed queuing components

 


Message channels

Message channels carry messages from one queue manager to another. Do not confuse with MQI channels. A message channel is defined using one of these types defined at one end, and a compatible type at the other end.

Host1 Host2 Description
Sender Receiver A sender on host1 starts the channel locally and sends a start request to the receiver at the other end of the channel at host2.

The sender sends messages from its transmission queue to the receiver.

The receiver puts the messages on the destination queue.

Requester Server A requester on Host1 starts a channel and requests the server on Host2 to start

The server sends messages to the requester using the transmission queue defined in its channel definition.

A fully qualified server can initiate the communication and send messages to a requester.

Requester Sender The requester starts the channel and the sender terminates the call.

The sender then restarts the communication according to information in its channel definition (this is known as callback.

It sends messages from the transmission queue to the requester.

Server Receiver Channel startup must be initiated at the server end of the link. Used by fully qualified servers.
Cluster sender Cluster receiver Each queue manager has a cluster-sender channel on which it can send cluster information to one of the full repository queue managers.

Queue managers can also send messages to other queue managers on cluster-sender channels

In a cluster, each queue manager has a cluster-receiver channel on which it can receive messages and information about the cluster.

 

Message-Channel Agents

message channel agents (MCA) control the sending and receiving of messages, with one message channel agent at each end of a channel. Messages are taken from the transmission queue and put onto the communication link. MCAs on remote hosts receive the message and delivers them onto a queue on the remote queue manager.

A message channel agent is called a caller MCA if it initiated the communication, otherwise it is called a responder MCA. A caller MCA may be associated with a sender, cluster-sender, server (fully qualified), or requester channel. A responder MCA may be associated with any type of message channel, except a cluster sender.

 

Transmission queues

A transmission queue is a special type of local queue used to store messages before they are transmitted by the MCA to the remote queue manager. In a distributed-queuing environment, you need to define one transmission queue for each sending MCA, unless you are using WebSphere MQ Queue Manager clusters.

You specify the name of the transmission queue in a remote queue definition. If you do not specify the name, the queue manager looks for a transmission queue with the same name as the remote queue manager.

You can specify the name of a default transmission queue for the queue manager. This is used if you do not specify the name of the transmission queue, and a transmission queue with the same name as the remote queue manager does not exist.

 

Channel initiators and listeners

A channel initiator acts as a trigger monitor for sender channels because a transmission queue may be defined as a triggered queue. When a message arrives on a transmission queue that satisfies the triggering criteria for that queue, a message is sent to the initiation queue, triggering the channel initiator to start the appropriate sender channel. You can also start server channels in this way if you specified the connection name of the partner in the channel definition. This means that channels can be started automatically, based upon messages arriving on the appropriate transmission queue.

You need a channel listener program to start receiving (responder) MCAs. Responder MCAs are started in response to a startup request from the caller MCA; the channel listener detects incoming network requests and starts the associated channel.

You can start as many channel initiators as you like, specifying a name for the initiation queue for each one. Normally you need only one initiator. On platforms that support clustering, when you start a queue manager, a channel initiator also is automatically started.

The channel initiator is also required for other functions. These are discussed later in this book.

On UNIX systems, use the channel listener program provided by WebSphere MQ or the facilities provided by the 'operating system' (for example, inetd for TCP/IP communications).

 

Channel-exit programs

If you want to do some additional processing (for example, encryption or data compression) you can write your own channel-exit programs or Transaction Processing SupportPacs.

WebSphere MQ calls channel-exit programs at defined places in the processing carried out by the MCA. There are six types of channel exit:

Security exit
Security checking, such as authentication of the partner.

Message exit
Operations on the message, for example, encryption prior to transmission.

Send and receive exits
Operations on split messages, for example, data compression and decompression.

Message-retry exit
Used when there is a problem putting the message to the destination.

Channel auto-definition exit
Modify the supplied default definition for an automatically defined receiver or server-connection channel.

Transport-retry exit
Suspend data being sent on a channel when communication is not possible.

The sequence of processing is as follows:

  1. The security exits are called after the initial data negotiation between both ends of the channel. These must end successfully for the startup phase to complete and to allow messages to be transferred.

  2. The message exit is called by the sending MCA, and then the send exit is called for each part of the message that is transmitted to the receiving MCA.

  3. The receiving MCA calls the receive exit when it receives each part of the message, and then calls the message exit when the whole message has been received.

The message-retry exit is used to determine how many times the receiving MCA will attempt to put a message to the destination queue before taking alternative action.

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.