EnablePartitioning Property

QueueDescription.EnablePartitioning Property


Gets or sets a value that indicates whether the queue to be partitioned across multiple message brokers is enabled.

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

public bool EnablePartitioning { get; set; }

Property Value

Type: System.Boolean

true if the queue to be partitioned across multiple message brokers is enabled; otherwise, false.

A partitioned queue consists of multiple fragments, each processed by a different message broker and stored in a different messaging store. This allows the throughput of a single queue or topic to exceed the maximum load a single message broker or messaging store can handle. At the same time, it enables the queue to remain available in case a messaging store becomes temporarily unavailable.

To enable partitioning for a queue, set the EnablePartitioning property to true. This value must be set at the time the queue is created. It is not possible to change this property on an existing queue.

Partitioned queues enforce a maximum message TimeToLive value of 30 days.

// Create partitioned queue.
NamespaceManager ns = NamespaceManager.CreateFromConnectionString(myConnectionString);
QueueDescription qd = new QueueDescription(QueueName);
qd.EnablePartitioning = true;
Return to top
© 2015 Microsoft