Skip to content

Descriptors Overview

Descriptors are the configuration model used by ServiceBus.Core.Rabbit to describe RabbitMQ topology and runtime behavior.

They allow applications to define messaging infrastructure without hardcoding RabbitMQ declarations directly inside application code.


Descriptor Categories

Category Purpose
Broker descriptors Define common client behavior.
Publisher descriptors Define publishing behavior and output topology.
Subscriber descriptors Define consuming behavior and input topology.
Topology descriptors Define exchanges, queues and bindings.
Retry descriptors Define retry behavior.
Delivery descriptors Define publisher confirmation behavior.

High-Level Model

graph TD

    PublisherBoundDescriptor --> Publisher

    SubscriberBoundDescriptor --> Subscriber

    ExchangeBoundDescriptor --> Exchange

    QueueBoundDescriptor --> Queue

    BinderDescriptor --> Binding

    RetryPolicyDescriptor --> Subscriber

    DeliveryConfirmation --> Publisher

Topology Model

classDiagram
    direction TB

    class ServiceDescriptor {
        +string Prefix
        +string Name
        +string FullName
    }

    class ExchangeDescriptor
    class QueueDescriptor

    class ExchangeBoundDescriptor
    class QueueBoundDescriptor
    class BinderDescriptor

    ServiceDescriptor <|-- ExchangeDescriptor
    ServiceDescriptor <|-- QueueDescriptor

    ExchangeDescriptor <|-- ExchangeBoundDescriptor
    QueueDescriptor <|-- QueueBoundDescriptor

    ExchangeBoundDescriptor --> QueueBoundDescriptor
    ExchangeBoundDescriptor --> ExchangeBoundDescriptor
    ExchangeBoundDescriptor --> BinderDescriptor
    QueueBoundDescriptor --> BinderDescriptor

Runtime Meaning

Descriptors are consumed by bound clients.

graph LR

    Descriptor --> Client

    Client --> RabbitMQ

The descriptor does not send or receive messages by itself.

It describes what the client must declare, bind, publish to, consume from, or observe at runtime.


Logical Names And Physical Names

Topology descriptors usually expose a logical name through Name.

RabbitMQ objects are created using FullName.

FullName is provided by ServiceDescriptor.

FullName = Prefix + "/" + Name

Example:

new ExchangeDescriptor
{
    Name = "orders"
};

With the default exchange prefix, the physical RabbitMQ exchange name becomes:

esb/exchange/orders

This behavior is documented in detail in the ServiceDescriptor, ExchangeDescriptor and QueueDescriptor pages.


Why Descriptors Matter

Descriptors make topology:

  • explicit;
  • reusable;
  • testable;
  • configuration-friendly;
  • independent from application business logic.

They are the central mechanism used by the RabbitMQ provider to translate application intent into RabbitMQ topology and client behavior.