ExpiresAfter Property

Gets or sets the duration after which the message buffer expires.

Namespace:  Microsoft.ServiceBus
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

Syntax

'Declaration
Public Property ExpiresAfter As TimeSpan
    Get
    Set
'Usage
Dim instance As MessageBufferPolicy
Dim value As TimeSpan

value = instance.ExpiresAfter

instance.ExpiresAfter = value
public TimeSpan ExpiresAfter { get; set; }
public:
property TimeSpan ExpiresAfter {
    TimeSpan get ();
    void set (TimeSpan value);
}
member ExpiresAfter : TimeSpan with get, set
function get ExpiresAfter () : TimeSpan
function set ExpiresAfter (value : TimeSpan)

Property Value

Type: System. . :: . .TimeSpan
Returns a TimeSpan that contains the duration after which the message buffer expires. The default is 5 minutes.

Remarks

You can set a duration between 1 minute and 10 minutes. This property indicates how long the message buffer idles before automatically deleting itself. You can reset the message buffer lifespan by requesting a message from the message buffer. For more information on configuring a message buffer, see How to: Configure an AppFabric Service Bus Message Buffer.

Note

The message buffer checks every 30 seconds to see if there has been new activity to determine whether to extend its lifespan. If there has been recent activity, the lifespan of the message buffer is extended by the duration specified by the ExpiresAfter property from this checkpoint instead of from the time of the last activity. As a consequence, the message buffer can get a lifespan up to 30 seconds longer than the expected lifespan.

See Also

Reference

MessageBufferPolicy Class

Microsoft.ServiceBus Namespace