Interface IRabbitMQQueuePolicyBuilder
Defines policy configuration methods for a RabbitMQ queue builder.
public interface IRabbitMQQueuePolicyBuilder
- Extension Methods
Methods
MaxLength(int)
Sets the maximum number of messages allowed in the queue.
IRabbitMQQueueBuilder MaxLength(int maxLength)
Parameters
maxLengthintThe maximum message count.
Returns
- IRabbitMQQueueBuilder
The builder for chaining.
Exceptions
- ArgumentOutOfRangeException
Thrown when
maxLengthis less than 1.
MaxLengthBytes(long)
Sets the maximum total size in bytes for all messages in the queue.
IRabbitMQQueueBuilder MaxLengthBytes(long maxBytes)
Parameters
maxByteslongThe maximum size in bytes.
Returns
- IRabbitMQQueueBuilder
The builder for chaining.
Exceptions
- ArgumentOutOfRangeException
Thrown when
maxBytesis less than 1.
MaxPayloadBytes(int?)
Sets the maximum inbound-payload length, in bytes, enforced at receive ingress before the body is materialized (defense-in-depth DoS hardening). An over-limit message is rejected before deserialization.
IRabbitMQQueueBuilder MaxPayloadBytes(int? maxBytes)
Parameters
Returns
- IRabbitMQQueueBuilder
The builder for chaining.
Exceptions
- ArgumentOutOfRangeException
Thrown when
maxBytesis less than 1.
MessageTtl(TimeSpan)
Sets the message time-to-live for messages in this queue.
IRabbitMQQueueBuilder MessageTtl(TimeSpan ttl)
Parameters
ttlTimeSpanThe TTL duration.
Returns
- IRabbitMQQueueBuilder
The builder for chaining.
Exceptions
- ArgumentOutOfRangeException
Thrown when
ttlis negative.