Interface IRabbitMQQueueDefinitionBuilder
Defines queue definition methods for a RabbitMQ queue builder.
public interface IRabbitMQQueueDefinitionBuilder
- Extension Methods
Methods
AutoDelete(bool)
Sets whether the queue is auto-deleted when all consumers disconnect.
IRabbitMQQueueBuilder AutoDelete(bool autoDelete = false)
Parameters
Returns
- IRabbitMQQueueBuilder
The builder for chaining.
Durable(bool)
Sets whether the queue is durable (survives broker restart).
IRabbitMQQueueBuilder Durable(bool durable = true)
Parameters
Returns
- IRabbitMQQueueBuilder
The builder for chaining.
Exclusive(bool)
Sets whether the queue is exclusive to the current connection.
IRabbitMQQueueBuilder Exclusive(bool exclusive = false)
Parameters
Returns
- IRabbitMQQueueBuilder
The builder for chaining.
Remarks
Exclusive queues are automatically deleted when the connection closes.
Name(string)
Sets the queue name.
IRabbitMQQueueBuilder Name(string name)
Parameters
namestringThe queue name.
Returns
- IRabbitMQQueueBuilder
The builder for chaining.
Exceptions
- ArgumentException
Thrown when
nameis null or whitespace.
PrefetchCount(ushort)
Sets the prefetch count (number of unacknowledged messages the broker will deliver).
IRabbitMQQueueBuilder PrefetchCount(ushort count)
Parameters
countushortThe prefetch count.
Returns
- IRabbitMQQueueBuilder
The builder for chaining.
Exceptions
- ArgumentOutOfRangeException
Thrown when
countis negative.