Message Exchange Patterns
Most messaging applications use the following messaging exchange patterns:
Events generally use the publish-subscribe model.
Queries and commands use the point-to-point or request-reply model.
With publish-subscribe messaging, messages sent by the producer (publisher) can be processed multiple times by different consumers (subscribers). Each consumer receives its own copy of the message for processing.
With point-to-point messaging, messages sent by the producer are processed by a single consumer.
You can use consumer groups to extend traditional point-to-point messaging. Consumer groups enable multiple consumers to share a queue, which is used as a single channel for messages from the producer. The receiving application can have multiple consumers, but each message is still only delivered to a single endpoint.
With request-reply messaging, applications achieve two-way communication using separate point-to-point channels: one for requests, and another for replies.
Now that you know the basics of messaging, let's move on to What are Event Brokers?.