Property Value

Type: System.Messaging.AcknowledgeTypesOne of the AcknowledgeTypes values, which represent both the types of acknowledgment messages the system posts in the administration queue and the conditions under which acknowledgments are returned to the sending application. The default is None.

The AcknowledgeType property specifies the type of acknowledgment messages requested by the sending application. Set the AcknowledgeType property before sending the message to request notification of certain occurrences—for example, a message reaching its destination queue, a message being retrieved, or a time-out preventing a message from reaching or being retrieved from the destination queue.

Message Queuing returns notification by sending acknowledgment messages to the AdministrationQueue property specified by the original message. An acknowledgment message's Acknowledgment property indicates the type of acknowledgment that it represents. For example, if an acknowledgment message was sent because a message did not reach the destination before the TimeToReachQueue interval expired, the Acknowledgment property of the acknowledgment message would contain the value ReachQueueTimeout.

The following code example sends and receives a message containing an order to and from a queue. It specifically requests a positive acknowledgment when the original message reaches or is retrieved from the queue.