MessagePropertyFilter.IsLastInTransaction Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a value that indicates whether to retrieve Message.IsLastInTransaction property information when receiving or peeking a message.

Namespace:   System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

[MessagingDescriptionAttribute("MsgIsLastInTransaction")]
public bool IsLastInTransaction { get; set; }

Property Value

Type: System.Boolean

true to receive Message.IsLastInTransaction information; otherwise, false. The default is false.

The IsLastInTransaction property of the Message class is used by receiving applications to verify whether a message is the last message sent from a single transaction to a single queue.

The following code example demonstrates the use of the IsLastInTransaction property.

// Set the queue's MessageReadPropertyFilter property to enable the
// message's IsLastInTransaction property.
queue.MessageReadPropertyFilter.IsLastInTransaction = true;

// Peek at the message. Time out after ten seconds in case the message
// was not delivered.
orderMessage = queue.Peek(TimeSpan.FromSeconds(10.0)); 

// Display the value of the message's IsLastInTransaction property.
Console.WriteLine("Message.IsLastInTransaction: {0}",
    orderMessage.IsLastInTransaction);

.NET Framework
Available since 1.1
Return to top
Show: