Implementing publish/subscribe with Service Bus topics
Messaging systems are implemented in hundreds of different technologies, but often they implement mainly two patterns: queue-based and publish/subscribe. The first, which is the main character of this chapter, stands on the concept of a single queue in which someone (one or many) sends a message and someone (and only one) receives the message to process and delete it.
Queue-based messaging is often implemented with a FIFO (First-In-First-Out) pattern and sometimes ordering is guaranteed (for example, in the Service Bus). On the other hand, there is the publish/subscribe messaging pattern that is the key component in many interconnected enterprise systems, known in the Service Bus as the Topic service.
In this pattern, a topic is created (like a queue) to make the messages go through, differently from a queue; along with the topic one or many subscriptions must be created. As Subscription tells which messages are of interest for it, based...