Sending Response Messages (COM)
A version of this page is also available for
4/8/2010
The receiving application can return response messages to the response queue provided by the sending application.
When the receiving application reads the message and sees that a response is requested (MSMQMessage.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.
Specify the MSMQQueueInfo object of the destination queue that contains the messages sent by the sending application.
Call MSMQQueueInfo.Open to open the destination queue with receive access.
Verify that a response message was requested.
This example inspects the MSMQMessage.ResponseQueueInfo property of the message and then uses MSMQMessage. ResponseQueueInfo to open the response queue if a response is requested.
Create the response message as needed.
Call MSMQMessage.Send to send the response message to the response queue.
See Also
Concepts
MSMQ COM Support
Using the COM Components
MSMQ Security