Acknowledgment Messages

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

Message Queuing is designed for the possibility of sending messages asynchronously to computers that are temporarily unavailable. When sending a message, Message Queuing indicates that the sending operation has succeeded as soon as the message is created with valid properties and placed in an outgoing queue where it remains until it is delivered to its destination or one of its timers expires. Note that the sending operation does not attempt to deliver the message.

Message Queuing handles the delivery of messages by continually checking for messages in all the local outgoing queues and attempting to transmit the messages found to their destinations. The Message Queuing service on the sending side does not return any information to the sending application if the message does not reach its destination queue or if the message is discarded before being retrieved by a receiving application. Applications can obtain information from acknowledgment messages sent back from the target side. Messages are lost without error reporting to the sending call in the following situations:

  • A transactional message is sent to a nontransactional queue. In MSMQ 1.0 and MSMQ 2.0, an error is returned when a transactional message is sent to a local nontransactional queue.

  • A nontransactional message is sent to a transactional queue. In MSMQ 1.0 and MSMQ 2.0, an error is returned when a nontransactional message is sent to a local transactional queue.

  • A message is sent without a request for authentication to a queue that accepts only authenticated messages.

  • A message is sent without being encrypted to a queue that accepts only encrypted messages.

  • The time-to-reach-queue (TTRQ) timer expires before the message reaches the destination queue.

  • The time-to-be-received (TTBR) timer expires before the message is removed from the destination queue.

  • The message storage quota of the target computer or the storage quota of the destination queue is exceeded or if there is no available storage space on the target computer when the message arrives.

  • The access rights needed to place the message in the destination queue are not allowed for the sender.

  • The digital signature attached to the message is not valid.

  • An encrypted (private) message cannot be decrypted by the destination queue manager.

  • The destination queue is purged or deleted before the message is retrieved.

Information about the ultimate outcome of message sending operations is provided by acknowledgment messages. Acknowledgment messages underlie the standard mechanism in Message Queuing for reporting errors that occur during message delivery. Reliable messaging can be implemented only when acknowledgment messages are requested.

Warning

Messages and the data in them can be lost silently if acknowledgment messages are not requested.

Acknowledgment messages are system-generated nontransactional messages that are sent to the administration queues specified by the sending application. These messages can indicate whether a message sent by the application has reached its destination queue or whether the message has been retrieved. When a message is lost, an acknowledgment message can indicate the reason for its loss. Acknowledgment messages are typically generated by Message Queuing, however they can also be generated by connector applications when messages are sent to foreign messaging systems.

Note

Acknowledgment messages are nontransactional, so the administration queues specified by the sending application must also be nontransactional queues

The system can return different types of acknowledgment messages. These include negative and positive acknowledgments indicating whether a message reached its destination queue, negative and positive acknowledgments indicating whether a message was retrieved by the receiving application, and a combination of both these types. The type of acknowledgment messages returned depends on the acknowledgment level of each message sent by the sending application.

Acknowledgment messages contain some of the information found in the original message; however, each acknowledgment message has its own message identifier and class. The message identifier, PROPID_M_MSGID or MSMQMessage.Id, identifies the acknowledgment in the same way it identifies each message sent by a Message Queuing application. The message class, PROPID_M_CLASS or MSMQMessage.MsgClass, identifies the type of acknowledgment posted. Both these properties are set by Message Queuing when it creates the acknowledgment message.

If a message is sent to multiple destination queues, Message Queuing returns an acknowledgment message for each copy of the message delivered).

For example code on requesting acknowledgments, see Acknowledging Message Examples.

More Information

For information on See
Administration queues Administration Queues
The different classes of acknowledgment messages Acknowledgment Message Classes
The values of the acknowledgment message properties set by the system Acknowledgment Message Properties
Associating an acknowledgment message with the message it acknowledges Matching Acknowledgment and Original Messages