Skip to content

QueueBoundDescriptor

QueueBoundDescriptor extends QueueDescriptor and represents a queue that participates in an exchange topology.

It is primarily used by publisher descriptors when declaring queue bindings.


Inheritance

classDiagram
    direction TB

    class ServiceDescriptor

    class QueueDescriptor

    class QueueBoundDescriptor

    ServiceDescriptor <|-- QueueDescriptor
    QueueDescriptor <|-- QueueBoundDescriptor

Purpose

A QueueDescriptor describes a queue.

A QueueBoundDescriptor describes a queue plus the binding information required by a topology.


Properties

Inherited from:

  • ServiceDescriptor
  • QueueDescriptor

Additional properties:

Property Description
Binder Binding configuration used to connect the queue to an exchange.

Direct Binding Example

new QueueBoundDescriptor
{
    Name = "orders.created",

    Durable = true,

    Binder = new BinderDescriptor
    {
        RoutingKey = "orders.created"
    }
};

Topic Binding Example

new QueueBoundDescriptor
{
    Name = "orders.eu.queue",

    Binder = new BinderDescriptor
    {
        RoutingKey = "orders.eu.*"
    }
};

Queue Arguments

RabbitMQ queue features are configured through Arguments.

Example:

new QueueBoundDescriptor
{
    Name = "orders.quorum",

    Arguments =
    {
        ["x-queue-type"] = "quorum"
    }
};

Runtime Behavior

graph LR

    Exchange

    Queue

    Binder

    Exchange --> Binder

    Binder --> Queue

The queue descriptor contributes:

  • queue declaration;
  • queue arguments;
  • binding metadata.

Queue Type Example

Classic:

x-queue-type = classic

Quorum:

x-queue-type = quorum

Stream:

x-queue-type = stream

When To Use

Use QueueBoundDescriptor when:

  • configuring publisher topologies;
  • attaching queues to exchanges;
  • defining routing behavior.

  • QueueDescriptor
  • ExchangeBoundDescriptor
  • BinderDescriptor
  • PublisherBoundDescriptor