Gets a value indicating whether the message was the first message sent in the transaction.
[Visual Basic] Overridable Public ReadOnly Property IsFirstInTransaction As _ Boolean [C#] public bool IsFirstInTransaction {virtual get;} [C++] public: __property virtual bool get_IsFirstInTransaction(); [JScript] public function get IsFirstInTransaction() : Boolean;
true if the message was the first message sent in the transaction; otherwise, false.
Exception Type | Condition |
---|---|
InvalidOperationException | The message queue is filtered not to read the IsFirstInTransaction property. |
IsFirstInTransaction provides access to the IsFirstInTransaction property of the Message Queuing MSMQMessage object.
IsFirstInTransaction is used by receiving applications to verify that a message was the first message sent in a single transaction to a single queue.
Note This property is available only with Message Queuing 2.0 and later.
You can use IsFirstInTransaction along with two other properties to verify transaction boundaries: IsLastInTransaction to check whether a message was the last message sent in the transaction, and TransactionId to retrieve the ID of the transaction.
If only one message is sent in a transaction, both IsFirstInTransaction and IsLastInTransaction are set to true.
Message Class | Message Members | System.Messaging Namespace | IsLastInTransaction | TransactionId | Transactional