Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This property indicates whether the message was the first message sent in a transaction.

Property ID

PROPID_M_FIRST_IN_XACT

Type Indicator

VT_UI1

MQPROPVARIANT Field

bVal

Property Values

The following values can be used.

Value Description

MQMSG_FIRST_IN_XACT

The message was the first message sent in the transaction.

MQMSG_NOT_FIRST_IN_XACT

The message was not the first message sent in the transaction.

Remarks

The PROPID_M_FIRST_IN_XACT property is available for MSMQ 2.0 and later.

It is used by receiving applications to verify that a message was the first message sent in a single transaction to a single queue.

To verify transaction boundaries, use PROPID_M_FIRST_IN_XACT with the following properties:

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_FIRST_IN_XACT is specified in the MQMSGPROPSstructure.

Copy Code
aMsgPropId[i] = PROPID_M_FIRST_IN_XACT; // Property ID
aMsgPropVar[i].vt = VT_UI1; 		 // Type indicator
i++;
...

msgprops.aPropVar = aMsgPropVar;
...

MQReceiveMessage(hQueue, ..., &msgprops, ...);

...
i++;
if(aMsgPropVar[i].bVal == MQMSG_FIRST_IN_XACT)
{
   

See Also