Specifies the types of acknowledgment message that Message Queuing returns to the sending application.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Assembly: System.Messaging (in System.Messaging.dll)
|A mask used to request positive acknowledgment if the original message reaches the queue or negative acknowledgment if the time-to-reach-queue timer expires or if the original message cannot be authenticated.|
|A mask used to request positive acknowledgment if the original message is received from the queue before its time-to-be-received timer expires or negative acknowledgment otherwise.|
|A mask used to request a negative acknowledgment when the original message fails to be received from the queue.|
Using the MessageQueue.Peek method does not remove a message from the queue, so this acknowledgment type could be returned even if you did peek the message. Only the MessageQueue.Receive method (or the related asynchronous MessageQueue.BeginReceive method) removes a message from the queue.
|A mask used to request that no acknowledgment messages (positive or negative) be posted.|
|A mask used to request a negative acknowledgment when the original message cannot reach the queue. This can happen when the time-to-reach-queue timer expires or if a message cannot be authenticated.|
|A mask used to request a negative acknowledgment when an error occurs that prevents the original message from being received from the queue before its time-to-be-received timer expires.|
|A mask used to request a positive acknowledgment when the original message reaches the queue.|
|A mask used to request a positive acknowledgment when the original message is successfully retrieved from the queue.|
The class provides a set of flags that you can combine to request one or more categories of acknowledgment messages.
When an application sends a message, it can request that Message Queuing return acknowledgment messages indicating the success or failure of the original message. Message Queuing sends these acknowledgment messages to the administration queue you specify. Acknowledgment types can be divided broadly into four groups: positive arrival acknowledgments, positive read acknowledgments, negative arrival acknowledgments, and negative read acknowledgments. Requesting acknowledgments enables your application to receive 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.
When you are using the Message class to send messages to a queue, you specify the types of acknowledgments your application should receive in the AcknowledgeType property, as well as the administration queue that receives the acknowledgment messages in the AdministrationQueue property.
When you use the Message class to read acknowledgment messages in the administration queue, the instance's Acknowledgment property indicates the condition responsible for the acknowledgment message, for example, if a time-out expired before the original message was read from the queue.
The following code example sends and receives a message that contains an order to and from a queue. It specifically requests a positive acknowledgment when the original message reaches or is retrieved from the queue.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.