MsmqElementBase.TimeToLive Właściwość

Definicja

Pobiera lub ustawia interwał czasu, który wskazuje, jak długo komunikaty przetwarzane przez to powiązanie mogą być w kolejce, zanim wygasną.

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

Wartość właściwości

TimeSpan

, TimeSpan która wskazuje, jak długo komunikaty mogą być w kolejce, zanim wygasną. Wartość domyślna to jeden dzień (01:00:00:00).

Atrybuty

Uwagi

Właściwość jest ustawiana w celu zapewnienia, że komunikaty wrażliwe na czas nie przestaną być nieaktualne przed TimeToLive ich przetworzeniem przez odbierające aplikacje. Komunikat w kolejce, który nie jest zużywany przez aplikację odbieraną w określonym przedziale czasu, jest określany jako wygasły. Wygasłe komunikaty są wysyłane do specjalnej kolejki o nazwie kolejka utraconych wiadomości. Lokalizacja kolejki utraconych wiadomości jest ustawiana z właściwością lub odpowiednią wartością DeadLetterQueue domyślną na podstawie gwarancji.

Dotyczy