Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

To request acknowledgment messages, the sending application must indicate the acknowledgment level of the message and the administration queue where the acknowledgment message will be placed.

Acknowledgment messages are returned to the administration queue specified by MSMQMessage.AdminQueueInfo. This queue is maintained by the sending application. It is the sending application's responsibility to create the queue, to read the messages in the queue, and to perform whatever actions are required as a result of the type of acknowledgment message returned by Message Queuing.

Note:
Each Message Queuing message can have no more than 4 MB of data.
To request acknowledgment messages
  1. Declare two MSMQQueueInfoobjects, an MSMQQueueobject, and an MSMQMessageobject.

  2. Obtain an MSMQQueueInfoobject for the administration queue.

    You can do this by creating a queue, locating an existing queue, or by specifying the pathname of a queue and calling MSMQQueueInfo.Refresh.

  3. Call MSMQQueueInfo.Opento open the destination queue.

  4. Set the acknowledgment level and administration queue properties of the message.

  5. (Optional) Set additional message properties.

  6. Call MSMQMessage.Sendto send the message to the destination queue.

  7. Call MSMQQueue.Closeto close the queue.

See Also