MessagePropertyFilter.SentTime Property


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

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

public bool SentTime { get; set; }

Property Value

Type: System.Boolean

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

The SentTime property of the Message class indicates the sending machine's date and time when the message was sent by the source Queue Manager.

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

// Set the queue's MessageReadPropertyFilter property to enable the
// message's SentTime property.
queue.MessageReadPropertyFilter.SentTime = 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 SentTime property.
Console.WriteLine("Message.SentTime: {0}",

.NET Framework
Available since 1.1
Return to top