MaxMessageCount Property

Gets or sets the maximum message count.

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

Syntax

'Declaration
Public Property MaxMessageCount As Integer
    Get
    Set
'Usage
Dim instance As MessageBufferPolicy
Dim value As Integer

value = instance.MaxMessageCount

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

Property Value

Type: System. . :: . .Int32
Returns the maximum message count. The default is 10 messages.

Remarks

The maximum message count refers to how many messages can be in the buffer at any given time. The maximum number of messages that the message buffer can hold is 50 messages. You can set this property from a value of 1 to 50. Once the message count cap is passed, the message buffer implements the overflow policy, as defined in OverflowPolicy For more information on setting message buffer policy, see How to: Configure an AppFabric Service Bus Message Buffer.

See Also

Reference

MessageBufferPolicy Class

Microsoft.ServiceBus Namespace