Enterprise Integration Patterns
Messaging Patterns
HOME PATTERNS RAMBLINGS ARTICLES TALKS DOWNLOAD BOOKS CONTACT
Messaging Patterns
Message DispatcherMessage DispatcherMessaging Patterns » Messaging Endpoints

An application is using Messaging. The application needs multiple consumers on a single Message Channel to work in a coordinated fashion.

How can multiple consumers on a single channel coordinate their message processing?

Create a Message Dispatcher on a channel that will consume messages from a channel and distribute them to performers.

A Message Dispatcher consists of two parts:

  1. Dispatcher – The object that consumes messages from a channel and distributes each message to a performer.
  2. Performer – The object that is given the message by the dispatcher and processes it.

When a Message Dispatcher receives a message, it obtains a performer and dispatches the message to the performer to process it. A performer can delegate to the rest of its application to help process its message. The performer could be newly created by the dispatcher, or could be selected from a pool of available performers. Each performer can run in its own thread to process messages concurrently. All performers may be appropriate for all messages, or the dispatcher may match a message to a specialized performer based on properties of the message.


Message Dispatcher Sequence

... Read the entire pattern in the book Enterprise Integration Patterns

Related patterns:

Competing Consumers, Datatype Channel, Remote Procedure Invocation, Event-Driven Consumer, Message Channel, Selective Consumer, Messaging, Point-to-Point Channel, Polling Consumer, Publish-Subscribe Channel, Claim Check, Transactional Client


Creative Commons Attribution License

You can reuse the following elements under the Creative Commons Attribution license: pattern icon, pattern name, problem and solution statements (in bold), and the sketch. Other portions are protected by copyright.

Enterprise Integration Patterns book cover

Enterprise Integration Patterns
The classic, as relevant as ever. Over 90,000 copies sold.

Software Architect Elevator book cover

The Software Architect Elevator
Learn how architects can play a critical role in IT transformation by applying their technical, communication, and organizational skills.

Cloud Strategy book cover

Cloud Strategy
Fill the large gap between high-level goals and product details by understanding decision trade-offs.