How to: Request Acknowledgement for Messages

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

You can request positive acknowledgement, negative acknowledgement, or a combination of acknowledgement types on the messages sent by your MessageQueue components. For an overview of acknowledgement types, see Message Acknowledgement.

To request acknowledgement of a message

  1. Create an instance of the MessageQueue component and set its Path property to the queue you want to reference. For more information, see How to: Create MessageQueue Component Instances.

  2. Create the message you want to send. For more information, see Sending and Serializing Messages.

  3. Set the AdministrationQueue property for your Message object to the queue to which you want acknowledgement messages sent.

  4. Set the Message object's AcknowledgeType property in the DefaultPropertiesToSend area to the appropriate value:

    • If you want acknowledgement when a message reaches or fails to reach the queue to which it was sent, set the property to FullReachQueue.

    • If you want acknowledgement when the message reaches or fails to be retrieved from the queue before its time-to-be-received timer expires, set the property to FullReceive. Note that this acknowledgement is generated by the queue manager, rather than by the destination application.

    • If you want to request negative acknowledgment when a message fails to be retrieved from the queue, set the property to NegativeReceive.

    • If you want acknowledgement only if a message you send fails to reach the queue, set the property to NotAcknowledgeReachQueue.

    • If you want acknowledgement only if a message you sent could not be retrieved by its destination application, set the property to NotAcknowledgeReceive.

    • If you want positive acknowledgment when the message reaches its queue, set the property to PositiveArrival.

    • If you want positive acknowledgment when the message is successfully retrieved from the queue, set the property to PositiveReceive.

      Tip

      For information on positive and negative acknowledgment, see Message Acknowledgement.

  5. Send the message, and then check the queue you specified in the AdministrationQueue property for the appropriate acknowledgement. For more information, see Reading and Receiving Messages.

To prevent acknowledgement messages from being sent

See Also

Tasks

How to: Create MessageQueue Component Instances

Concepts

Message Acknowledgement

Other Resources

Sending and Serializing Messages

Reading and Receiving Messages

Sending and Serializing Messages