Name

Competing Consumers Pattern

Goal

To distribute message processing across multiple consumers, allowing multiple messages to be processed in parallel (Figure C-1).

Competing consumers
Figure C-1. Competing consumers

Participants

Message originators

One or more applications sending messages.

Queue

List of messages.

Multiple consumers

Consumers with access to read and process the messages in the queue.

Interactions

One or more applications send messages to a queue. Multiple consumers access the queue, each reading different messages and processing them. Each message is read from the queue by one and only one consumer.

Notes

The Competing Consumers pattern is best implemented using JMS, as Internet mail providers generally do not support multiple readers on a single mailbox terribly well.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.17.40