PROPID_M_LAST_IN_XACT
This property indicates whether the message was the last message sent in a transaction.
- Property ID
PROPID_M_LAST_IN_XACT - Type Indicator
VT_UI1 - MQPROPVARIANT Field
bVal - Property Values
The following table shows the values.Value Description MQMSG_LAST_IN_XACT The message was the last message sent in the transaction. MQMSG_NOT_LAST_IN_XACT The message was not the last message sent in the transaction.
Remarks
The PROPID_M_LAST_IN_XACT property is available for MSMQ 2.0 and later. It is used by receiving applications to verify that a message was the last message sent from a single transaction to a single queue.
You can use PROPID_M_LAST_IN_XACT along with two other properties to verify transaction boundaries. These two properties are a property for checking the first message sent in a transaction and a property for retrieving the identifier of the transaction: PROPID_M_FIRST_IN_XACT and PROPID_M_XACTID.
If only one message is sent in a transaction, both PROPID_M_FIRST_XACT and PROPID_M_LAST_XACT are set.
Examples
The following code example shows how PROPID_M_LAST_IN_XACT is specified in the MQMSGPROPS structure.
aMsgPropId[i] = PROPID_M_LAST_IN_XACT; // Property ID
aMsgPropVar[i].vt = VT_UI1; // Type indicator
i++;
...
msgprops.aPropVar = aMsgPropVar;
...
MQReceiveMessage(hQueue, ..., &msgprops, ...);
...
i++;
if(aMsgPropVar[i].bVal == MQMSG_LAST_IN_XACT)
{
See Also
PROPID_M_FIRST_IN_XACT | PROPID_M_XACTID
Last updated on Friday, April 09, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.