Skip to content

Topology Patterns

ServiceBus.Core descriptors allow complex RabbitMQ topologies to be represented declaratively.

Understanding common topology patterns helps design scalable messaging infrastructures.


Point-To-Point

The simplest topology.

graph LR

    Exchange --> Queue

Characteristics:

  • single destination;
  • deterministic delivery;
  • simple maintenance.

Typical usage:

  • command processing;
  • background jobs.

Publish / Subscribe

Multiple consumers receive the same message.

graph LR

    Exchange --> QueueA

    Exchange --> QueueB

    Exchange --> QueueC

Characteristics:

  • broadcast communication;
  • independent consumers;
  • loose coupling.

Typical usage:

  • integration events;
  • notifications;
  • audit processing.

Exchange Chain

Messages flow through multiple exchanges.

graph LR

    Orders --> Integration

    Integration --> Audit

    Audit --> Queue

Benefits:

  • topology composition;
  • separation of concerns;
  • reusable routing layers.

Replication Pattern

A message is distributed to multiple systems.

graph LR

    Orders --> ERP

    Orders --> CRM

    Orders --> Analytics

Typical usage:

  • enterprise integration;
  • reporting;
  • monitoring.

Environment Isolation

Dedicated topologies per environment.

graph LR

    OrdersExchange --> Dev

    OrdersExchange --> QA

    OrdersExchange --> Production

Benefits:

  • safer deployments;
  • environment separation;
  • easier testing.

Descriptor Mapping

The following descriptors are typically involved:

Descriptor Responsibility
ExchangeDescriptor Exchange definition
QueueDescriptor Queue definition
ExchangeBoundDescriptor Topology composition
BinderDescriptor Binding definition

Topology design is one of the primary reasons the descriptor model exists.