You can set up your MessageQueue component to generate acknowledgement messages that tell you whether the message was successfully delivered. There are two main types of acknowledgement you can receive:
- Acknowledgement that the message reached its destination queue.
- Acknowledgement that the message was retrieved from the queue by the destination application.
Within each of these scenarios, you can also receive positive or negative acknowledgement. In positive acknowledgement, you receive an acknowledgement message when your message successfully reaches its destination queue or application. In negative acknowledgement, you receive an acknowledgement message when your message fails to reach its destination queue or application. A message might fail to reach its destination if its time-out period expires or if the message cannot be authenticated.
As with most operations in Message Queuing, acknowledgements are handled via sending a new message to a queue. In this case, the acknowledgement message is sent from the target queue to a special type of queue called an Administration queue. Acknowledgement messages differ from standard messages in that they contain no attached body; only the information in the message header is of interest in an acknowledgement.
Note Acknowledgement messages for your application are sent to whatever queue you specify in the AdministrationQueue property, either in the DefaultPropertiestoSend class for your component instance or on the Message object. You determine the type of acknowledgement you want to receive by setting the AcknowledgeType property to one of its predetermined values.
You can check acknowledgement messages in the same way you check any message on a queue — by peeking at the acknowledgement queue or removing messages from it. For more information, see Reading and Receiving Messages.
For instructions on setting up acknowledgement, see Requesting Acknowledgement for Messages.