Partager via


Requesting Response Messages (COM) (Windows Embedded CE 6.0)

1/6/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

  1. 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.

  2. Locate the response queue, creating one if it does not exist.

  3. Locate the destination queue, creating one if it does not exist.

  4. Open the destination queue and send the message.

  5. Retrieve the MSMQMessage.ResponseQueueInfo property from the message, and return a response message if one is requested.

See Also

Concepts

Sending Messages to a Queue (COM)
MSMQ COM Support
Using the COM Components
MSMQ Security

Other Resources

Message Queuing