Class RabbitMQQueueOptions
Configuration options for a RabbitMQ queue.
public sealed class RabbitMQQueueOptions
- Inheritance
-
RabbitMQQueueOptions
- Inherited Members
- Extension Methods
Remarks
This type intentionally exceeds the Microsoft-first ≤10-property DTO guideline: it is a flat mirror
of the AMQP queue.declare / basic.qos parameter surface that RabbitMQ consumers already
know — Durable, Exclusive, AutoDelete and the
Arguments map (into which MessageTtl → x-message-ttl,
MaxLength → x-max-length, MaxLengthBytes → x-max-length-bytes),
plus the consumer setting PrefetchCount (→ basic.qos) and the
framework's MaxPayloadBytes ingress guard. Splitting these into nested groups would diverge
from the well-known broker vocabulary and reduce discoverability, so the flat surface is retained by design.
Properties
Arguments
Gets the additional arguments for queue declaration.
public Dictionary<string, object> Arguments { get; }
Property Value
- Dictionary<string, object>
A dictionary of additional arguments.
AutoDelete
Gets or sets a value indicating whether the queue is auto-deleted when no longer used.
public bool AutoDelete { get; set; }
Property Value
Durable
Gets or sets a value indicating whether the queue is durable.
public bool Durable { get; set; }
Property Value
Exclusive
Gets or sets a value indicating whether the queue is exclusive to this connection.
public bool Exclusive { get; set; }
Property Value
MaxLength
Gets or sets the maximum number of messages in the queue.
public int? MaxLength { get; set; }
Property Value
- int?
The max length, or null for unlimited.
MaxLengthBytes
Gets or sets the maximum total size in bytes for messages in the queue.
public long? MaxLengthBytes { get; set; }
Property Value
- long?
The max length in bytes, or null for unlimited.
MaxPayloadBytes
Gets or 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.
public int? MaxPayloadBytes { get; set; }
Property Value
- int?
The maximum payload length in bytes. Default is 4 MiB (bounded so the guard is never inert). Set to null to opt out (unbounded) for larger legitimate payloads.
MessageTtl
Gets or sets the message time-to-live.
public TimeSpan? MessageTtl { get; set; }
Property Value
- TimeSpan?
The TTL duration, or null for no TTL.
Name
Gets or sets the queue name.
public string Name { get; set; }
Property Value
- string
The queue name.
PrefetchCount
Gets or sets the prefetch count for this queue.
public ushort PrefetchCount { get; set; }
Property Value
- ushort
The prefetch count. Default is 100.