Other useful fields

By default, no reply is generated when an administration request is processed. If a reply is required, then the request message must be set up to ask for a reply message. The following fields are defined in the MQe class and are used to request a reply.
Msg_Style
A field of type int that can take one of three values:
Msg_Style_Datagram
A command not requiring a reply
Msg_Style_Request
A request that would like a reply
Msg_Style_Reply
A reply to a request
If Msg_Style is set to Msg_Style_Request (a reply is required), the location that the reply is to be sent to must be set into the request message. The two fields used to set the location are:
Msg_ReplyToQ
An ASCII field used to hold the name of the queue for the reply
Msg_ReplyToQMgr
An ASCII field used to hold the name of the queue manager for the reply

If the reply-to queue manager is not the queue manager that processes the request then the queue manager that processes the request must have a connection defined to the reply-to queue manager.

For an administration request message to be correlated to its reply message the request message needs to contain fields that uniquely identify the request, and that can then be copied into the reply message. MQe provides two fields that can be used for this purpose:
Msg_MsgID
A byte array containing the message ID
Msg_CorrelID
A byte array containing the Correl ID of the message
Any other fields can be used but these two have the added benefit that they are used by the queue manager to optimize searching of queues and message retrieval. The following code fragment provides an example of how to prime a request message.

Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.