Competing consumers
In the previous example, we used Azure functions as the consumers of a message queue. This approach could already be accepted as an implementation of competing consumers where the provided message queue is handled by multiple worker modules.
While this would provide scaling requirements and allow for performant execution, as a product owner we would not have any control over the function instances created to consume the events from the message queue. In order to be able to throttle and manage the queue, a message broker mechanism can be introduced, which will control the flow of messages into the queue. Once the messages are pushed into the queue, multiple consumers can retrieve, process, and complete the messages.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access