This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
Requesting Acknowledgment for a Message
You can request positive acknowledgment, negative acknowledgment, or a combination of acknowledgment types on the messages sent by your MessageQueue components. For an overview of acknowledgment types, see Message Acknowledgment.
To request acknowledgment of a message
- Create an instance of the MessageQueue component and set its Path property to the queue you want to reference. For details, see Creating MessageQueue Components.
- Create the message you want to send. For details, see Sending and Serializing Messages.
- Set the AdministrationQueue property for your Message object to the queue to which you want to send acknowledgment messages.
- Set the Message object’s AcknowledgeType property to the appropriate value:
- If you want acknowledgment when a message reaches or fails to reach the queue to which it was sent, set the property to FullReachQueue.
- If you want acknowledgment when the message reaches or fails to reach the destination application, set the property to FullReceive. Note that this acknowledgment is generated by the queue manager, rather than by the destination application.
- If you want acknowledgment only if a message you send fails to reach the destination queue, set the property to NotAcknowledgeReachQueue.
- If you want acknowledgment only if a message you sent cannot be retrieved by its destination application, set the property to NotAcknowledgeReceive.
- Send the message, and then check the queue you specified in the AdministrationQueue property for the appropriate acknowledgment. For details, see Reading and Receiving Messages.
To prevent acknowledgment messages from being sent
- Set the AcknowledgeType property for your component to None.
See Also
Sending and Serializing Messages | Message Acknowledgment | Creating MessageQueue Components | Reading and Receiving Messages | Sending and Serializing Messages |