RabbitMQ entities

The following page explains how the Topics and Subscription entities in the Relativity service bus translate to the new entities in RabbitMQ. Where service bus has Topics, Subscriptions, and Queues, RabbitMQ has Exchanges, Queues, and Bindings:

  • Exchange – serves as message routing mechanisms. There are two types of exchanges used by Relativity:
    • Fanout Exchange - each message sent to a fanout exchange has a copy sent to each queue and exchange bound to the fanout exchange receiving the message.
    • Direct Exchange – each message sent to a direct exchange has a copy sent to each queue and exchange bound to the direct exchange where the routing key of the message matches the routing key of the binding.

    All exchanges used by Relativity are durable which means they persist to disk and survive server restarts.

  • Queue – stores messages and delivers them to clients as requested.
    • All queues used by Relativity are durable which means they persist to disk and survive server restarts.
    • All messages in queues used by Relativity persist to disk and survive server restarts.
  • Bindings – rules used to route messages between exchanges and queues.
    • In general, a binding between an exchange and another exchange or an exchange and a queue causes a copy of each message sent to the first exchange to be routed to the bound exchange or queue.
    • Direct exchanges support bindings with a routing key that will only accept messages when the message’s routing key matches.

Note: For more information, see AMQP 0-9-1 Model on the RabbitMQ website.

Relativity service bus entity to RabbitMQ entity mapping

The following section explains how the Topics and Subscription entities in the Relativity service bus translate to the new entities in RabbitMQ.

(Click to expand)

Relativity service bus entity Exchanges Queues Bindings
Topic
  • Fanout exchange with the topic name.
  • If a filtered subscription is present: a direct (Filter) exchange named {Topic}-FE.
None If a filtered subscription is present: a binding from the fanout exchange to the direct exchange.

Subscription

Deadletter exchange to forward failed messaged to the subscription’s deadletter queue named {Topic}_{Subscription}-DLE.
  • A queue to hold the message for the subscription named {Topic}_{Subscription}
  • A deadletter queue to hold failed messages for the subscription named {Topic}_{Subscription}-DLQ.
  • A binding from the Topic to the queue.
  • A binding from the deadletter exchange to the deadletter queue.

Filtered subscription

Same as subscription Same as subscription
  • A binding from the topic’s filter exchange to the queue with a routing key equal to the filter value.
  • A binding from the deadletter exchange to the deadletter queue.

Queue

  • Fanout exchange with the queue name.
  • Deadletter exchange to forward failed messaged to the queue’s deadletter queue named {QueueName}-DLE.
  • A queue to hold the message.
  • A deadletter queue to hold failed messages for the subscription named {QueueName}-DLQ.
  • A binding from the queue’s exchange to the RabbitMQ queue.
  • A binding from the deadletter exchange to the deadletter queue.

You can use the RabbitMQ management UI to view the current status of entities on the Relativity service bus. For more information, see RabbitMQ management UI.