Muokkaa

Jaa


MsmqBindingElementBase.TimeToLive Property

Definition

Gets or sets a value that specifies how long messages are valid. When this time has elapsed, the message is placed in a dead-letter queue (if available).

public:
 property TimeSpan TimeToLive { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.ServiceModel.TimeSpanOrInfiniteConverter))]
[System.Configuration.ConfigurationProperty("timeToLive", DefaultValue="1.00:00:00")]
public TimeSpan TimeToLive { get; set; }
[System.Configuration.ConfigurationProperty("timeToLive", DefaultValue="1.00:00:00")]
[System.ComponentModel.TypeConverter(typeof(System.Runtime.TimeSpanOrInfiniteConverter))]
public TimeSpan TimeToLive { get; set; }
[System.Configuration.ConfigurationProperty("timeToLive", DefaultValue="1.00:00:00")]
[System.ComponentModel.TypeConverter(typeof(System.ServiceModel.Configuration.TimeSpanOrInfiniteConverter))]
public TimeSpan TimeToLive { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.ServiceModel.TimeSpanOrInfiniteConverter))>]
[<System.Configuration.ConfigurationProperty("timeToLive", DefaultValue="1.00:00:00")>]
member this.TimeToLive : TimeSpan with get, set
[<System.Configuration.ConfigurationProperty("timeToLive", DefaultValue="1.00:00:00")>]
[<System.ComponentModel.TypeConverter(typeof(System.Runtime.TimeSpanOrInfiniteConverter))>]
member this.TimeToLive : TimeSpan with get, set
[<System.Configuration.ConfigurationProperty("timeToLive", DefaultValue="1.00:00:00")>]
[<System.ComponentModel.TypeConverter(typeof(System.ServiceModel.Configuration.TimeSpanOrInfiniteConverter))>]
member this.TimeToLive : TimeSpan with get, set
Public Property TimeToLive As TimeSpan

Property Value

A TimeSpan value that specifies how long messages are valid. The default value is 24 hours.

Attributes

Remarks

Queued applications, by design, work in a disconnected manner, so the sending and receiving applications might not be running at the same time. Therefore, a message sent by the sending application might not be processed immediately by the receiving application. Some messages contain information that is valid only for a particular period of time. If this message is not delivered within that period of time, it no longer contains useful information and should be dropped. This property enables you to specify a time limit for how long a message is kept prior to delivery to the application queue. If this time limit elapses prior to the message being delivered to the application queue, the message is placed in the dead-letter queue if one is available (determined by the DeadLetterQueue property); otherwise, if no dead-letter queue is available, the message is dropped.

Applies to