Skip to content

Casing in point: Topics and topics, Subscriptions and subscriptions

Pete Smith edited this page Jul 31, 2014 · 6 revisions

AzureNetQ is based on Service Bus for windows, and inspired/forked from it's parent project EasyNetQ which was based on RabbitMQ.

Unfortunately, both Service Bus and EasyNetQ define their own terminology, and in some cases there are clashes. To resolve these, library terminology will always start with a lower case letter, and Service Bus terms will use an upper case letter.

###EasyNetQ/AzureNetQ terms

  • queues - a queue is a vitrual entity to which messages can be published and received via subscriptions.
  • topics - topic based routing allows a subscriber to filter messages based on multiple criteria. A topic is a list of words delimited by dots that are published along with the message.
  • subscriptions - a subscription to a queue is made by calling Subscribe() or SubscribeAsync(). A subscription id is a unique identifier that allows the library to segment consumers so that they are only competing between those with the same subscription id.

In AzureNetQ, the term queue may be used to refer to a Service Bus Queue or a Topic/Subscription pair, as per the definitions below.

###Service Bus terms In the context of Service Bus, Queues, Topics and Subscriptions are messaging entities within the service bus broker.

  • Queues - Queues offer First In, First Out (FIFO) message delivery to one or more competing consumers. That is, messages are typically expected to be received and processed by the receivers in the temporal order in which they were added to the queue, and each message is received and processed by only one message consumer.
  • Topics - Messages are sent to a Topic in the same way they are sent to a Queue, but messages are not received from the Topic directly. Instead, they are received from Subscriptions.
  • Subscriptions - A Subscription belongs to a Topic and resembles a virtual queue that receives copies of the messages that are sent to the Topic. Messages are received from a Subscription identically to the way they are received from a Queue. In this manner it is possible to define non-competing consumers.

So remember, lower case denotes an EasyNetQ/AzureNetQ term, and upper case represents a Service Bus one.