Share via


PROPID_M_ACKNOWLEDGE

This property specifies the type of acknowledgment messages the system posts (in the administration queue) and when acknowledgments are returned.

  • Type Indicator
    VT_UI1 (or VT_NULL)
  • PROPVARIANT Field
    bVal
  • Property Values
    This property can be set to one or more of the following values using the OR operator.
    Value Description
    MQMSG_ACKNOWLEDGMENT_FULL_REACH_QUEUE Posts a positive or negative acknowledgment depending on whether the message reaches the queue. A negative acknowledgment is posted when the time-to-reach-queue timer of the message expires or when the message cannot be authenticated.
    MQMSG_ACKNOWLEDGMENT_NACK_REACH_QUEUE Posts a negative acknowledgment when the message cannot reach the queue. A negative acknowledgment is posted when the time-to-reach-queue timer of the message expires or when the message cannot be authenticated.
    MQMSG_ACKNOWLEDGMENT_FULL_RECEIVE Posts a positive or negative acknowledgment depending on whether the message is retrieved from the queue before its time-to-be-received timer expires.
    MQMSG_ACKNOWLEDGMENT_NACK_RECEIVE Posts a negative acknowledgment when an error occurs and the message cannot be retrieved from the queue before its time-to-be-received timer expires.
    MQMSG_ACKNOWLEDGMENT_NONE The default. No acknowledgment messages (positive or negative) are posted.

Remarks

When asking for acknowledgments, you must also specify the administration queue where the acknowledgment messages will be sent.

To request acknowledgment messages, specify PROPID_M_ACKNOWLEDGE and PROPID_M_ADMIN_QUEUE in the MQMSGPROPS structure and call MQSendMessage.

To find out if an acknowledgment message was requested for a message in a queue, specify PROPID_M_ACKNOWLEDGE in the MQMSGPROPS structure. Then, call MQReceiveMessage and examine its returned value. (When specifying PROPID_M_ACKNOWLEDGE, you can set its Type Indicator to VT_NULL. When the Type Indicator is set to VT_NULL, MSMQ sets the VT field to the appropriate type indicator.)

To receive a positive acknowledgment message when a message reaches its destination and when the message is retrieved, the following two full-acknowledgment settings must be combined using the OR operator: MQMSG_FULL_REACH_QUEUE and MQMSG_FULL_RECEIVE.

Acknowledgment messages are typically MSMQ-generated messages, however they can also be created by MSMQ connector applications when sending messages to a foreign queue.

Example

This example shows how PROPID_M_ACKNOWLEDGE is specified in the MQMSGPROPS structure.

aMsgPropId[i] = PROPID_M_ACKNOWLEDGE;   // Property ID
aMsgPropVar[i].vt = VT_UI1;             // Type indicator
aMsgPropVar[i].bVal = MQMSG_ACKNOWLEDGMENT_FULL_RECEIVE;
i++;

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack. Mq.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

MQReceiveMessage, MQSendMessage, PROPID_M_ADMIN_QUEUE, MQMSGPROPS

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.