Runtime tools : Service components : Communication services : MQ Connector : Concepts : MQ Connector example
  
MQ Connector example
The following is an example of how MQ Connector might work. MQ Connector adapts its behavior to the existing WebSphere MQ definition that will be different for each environment. For instance, it is not mandatory to have two channels defined as in this example. They are only needed if two queue managers are used.
The MQ Connector service puts messages in a local queue to be sent to a remote queue manager. The local queue manager has definitions for a transmission queue and a channel.
To send and receive messages, the queue manager has two channels defined, as shown in the following figure (where they are identified as SERVER.TO.HOST and HOST.TO.SERVER):
Diagramillustrating MQ Connector service queue manager needs two channels to be definedto send and receive messages
The HOST.TO.SERVER channel is of type server-requested, because the MQ Connector service starts the channel and the sender terminates the call. The local queue in the MQ Connector service, shown here as replyToQ, receives responses from the host.
An application can send data using WebSphere MQ in the following two ways:
The application can create the MQMessage to be sent
The application can let the service create the MQMessage with a sequence number assigned by the sending channel (MQConnection)
To receive data, the application has the following two options:
The application wants to send a message and receive only the response to this message. In this case, the sequence number is used as a reference to get the response. It is regarded as a permanent attribute of the message, and is consequently retained by the receiving channel to identify the replies. (External definition tag synchronousMode="enabled")
The application wants to receive all the messages coming from the receive queue assigned to MQConnection. In this case, the message sequence numbering can be removed by the receiving channel. The application must also send the message. The difference between this and the previous implementation is that here the response corresponding to a request is identified by another method; for example, by the message itself. (External definition tag synchronousMode="disabled")
Go up to
Concepts