MSMQMessage.Ack (Windows CE 5.0)
This property specifies the type of acknowledgment messages that Message Queuing posts in the administration queue and when acknowledgments are returned to the sending application.
HRESULT get_Ack( long* plAck);HRESULT put_Ack( long* lAck);
Parameters
- plAck or lAck
Type of acknowledgment message that Message Queuing posts in the administration queue. The following table shows the possible values.Value Description MQMSG_ACKNOWLEDGMENT_FULL_REACH_QUEUE Posts positive and negative acknowledgments depending on whether the message reaches the queue. This can happen when the time-to-reach-queue timer expires or when a 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_REACH_QUEUE Posts a negative acknowledgment when the message cannot reach the queue. This can happen when the time-to-reach-queue timer expires or when a message cannot be authenticated. 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.
Return Values
The following table describes the common return values.
Value | Description |
---|---|
S_OK | Success |
E_INVALIDARG | One or more arguments are invalid |
E_NOTIMPL | The function contains no implementation |
E_OUTOFMEMORY | Out of memory |
Remarks
To receive a positive acknowledgment message when a message reaches its destination and when the message is retrieved, the following full-acknowledgment settings must be combined using the OR operator:
- MQMSG_FULL_REACH_QUEUE
- MQMSG_FULL_RECEIVE
An administrative queue specified by the message sends positive and negative acknowledgments.
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, MSMQMessage.Id, identifies the acknowledgment in the same way it identifies each message sent by a Message Queuing application.
To request acknowledgment messages, the sending application must set Ack and MSMQMessage.AdminQueueInfo when sending messages.
To find out if acknowledgment messages were requested, the receiving application can examine Ack and MSMQMessage.AdminQueueInfo when it reads the messages in the queue.
Equivalent Function Property
When using function calls, the acknowledgment level of the message can be set and retrieved using the PROPID_M_ACKNOWLEDGE message property.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Mqoai.h.
Link Library: Mqoa.lib.
See Also
MSMQMessage.AdminQueueInfo | MSMQMessage.Id | PROPID_M_ACKNOWLEDGE
Send Feedback on this topic to the authors