Requesting Response Messages (COM)
A version of this page is also available for
4/8/2010
By sending the MSMQQueueInfo object of a second queue along with a message, the sending application indicates that it expects a response message from the receiving application. The MSMQQueueInfo object is passed in the MSMQMessage.ResponseQueueInfo property of the message.
When the receiving application reads the message and sees that a response is requested (ResponseQueueInfo is not NULL), it should then return a response message to the queue specified by MSMQMessage.ResponseQueueInfo.
Note
Each Message Queuing message can have no more than 4 MB of data.
To request a response
Determine what type of response message is needed.
Response messages are application-defined, consequently both the sending and receiving applications must be able to understand the message.
Locate the response queue, creating one if it does not exist.
Locate the destination queue, creating one if it does not exist.
Open the destination queue and send the message.
Retrieve the MSMQMessage.ResponseQueueInfo property from the message, and return a response message if one is requested.
See Also
Concepts
MSMQ COM Support
Using the COM Components
MSMQ Security