QueuePolicy.MaxMessageAge Property

[This is prerelease documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets or sets the maximum message age.

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

Usage

    Dim instance As QueuePolicy
Dim value As TimeSpan

value = instance.MaxMessageAge

instance.MaxMessageAge = value

Syntax

'Declaration
Public Property MaxMessageAge As TimeSpan
public TimeSpan MaxMessageAge { get; set; }
public:
property TimeSpan MaxMessageAge {
    TimeSpan get ();
    void set (TimeSpan value);
}
/** @property */
public TimeSpan get_MaxMessageAge ()

/** @property */
public void set_MaxMessageAge (TimeSpan value)
public function get MaxMessageAge () : TimeSpan

public function set MaxMessageAge (value : TimeSpan)

Property Value

Returns a TimeSpan containing the maximum message age. The minimum value for this setting is 0, the default setting is 10 minutes, and the maximum value is 7 days. Contains the maximum message age.

Remarks

Messages are tagged with a timestamp as they arrive in the Queue. The maximum message age sets an expiration timer based on the message timestamp and the maximum message age. Once a message residing in the Queue expires, the message is automatically dropped from the Queue. The Queue will drop messages independent of retrieval operations.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003 , Windows Server 2008, and Windows 2000

Target Platforms

See Also

Reference

QueuePolicy Class
QueuePolicy Members
Microsoft.ServiceBus Namespace