Gets a value indicating whether the message was the last message sent in the transaction.
[Visual Basic] Overridable Public ReadOnly Property IsLastInTransaction As Boolean [C#] public bool IsLastInTransaction {virtual get;} [C++] public: __property virtual bool get_IsLastInTransaction(); [JScript] public function get IsLastInTransaction() : Boolean;
true if the message was the last message sent in a single transaction; otherwise, false.
Exception Type | Condition |
---|---|
InvalidOperationException | The message queue is filtered not to read the IsLastInTransaction property. |
IsLastInTransaction provides access to the IsLastInTransaction property of the Message Queuing MSMQMessage object.
IsLastInTransaction is used by receiving applications to verify that a message was the last 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 IsLastInTransaction along with two other properties to verify transaction boundaries: IsFirstInTransaction to check whether a message was the first 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 | IsFirstInTransaction | TransactionId | Transactional