MsmqMessage<T>.TimeToReachQueue Property

Definition

Gets or sets a TimeSpan that indicates the maximum amount of time allowed for the message to reach the destination queue.

public:
 property Nullable<TimeSpan> TimeToReachQueue { Nullable<TimeSpan> get(); void set(Nullable<TimeSpan> value); };
public TimeSpan? TimeToReachQueue { get; set; }
member this.TimeToReachQueue : Nullable<TimeSpan> with get, set
Public Property TimeToReachQueue As Nullable(Of TimeSpan)

Property Value

A TimeSpan that indicates the maximum amount of time allowed for the message to reach the destination queue. May be null.

Examples

message.TimeToReachQueue = new TimeSpan(0,10,0);
message.TimeToReachQueue = New TimeSpan(0, 10, 0)

Remarks

If the interval specified by this property expires before the message reaches its destination queue, Message Queuing (MSMQ) discards the message in one of two ways. If the message's UseDeadLetterQueue property is true, the message is sent to the dead-letter queue. Otherwise, the message is dropped.

The default for this property is null.

Applies to