BrokeredMessageProperty.TimeToLive Property

Definition

Gets or sets the message’s time to live value. This is the duration after which the message expires, starting from when the message is sent to the Service Bus.Messages older than their TimeToLive value will expire and no longer be retained in the message store. Subscribers will be unable to receive expired messages.

public TimeSpan TimeToLive { get; set; }
member this.TimeToLive : TimeSpan with get, set
Public Property TimeToLive As TimeSpan

Property Value

The message’s time to live value.

Exceptions

If the message is in disposed state.

If the passed in value is less than or equal to TimeSpan.Zero.

Applies to