PROPID_M_LAST_IN_XACT (Windows Embedded CE 6.0)
1/6/2010
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 values can be used.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.
To verify transaction boundaries, use PROPID_M_LAST_IN_XACT with the following properties:
- PROPID_M_FIRST_IN_XACT, which is a property for checking the first message sent in a transaction
- PROPID_M_XACTID, which is a property for retrieving the identifier of the transaction
If only one message is sent in a transaction, 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)
{