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 de-facto language for designing asynchronous, distributed systems. Over 100,000 copies sold.

Software Architect Elevator book cover

The Software Architect Elevator
Rethink the role of architects as a connecting element across organizational layers. Acquire the technical, communication, and organizational skills to succeed in this new role.

Cloud Strategy book cover

Cloud Strategy
Make your cloud migration a success by translating high-level goals into conscious decisions with well-understood trade-offs.

Platform Strategy book cover

Platform Strategy
Platforms can boost innovation through harmonization, but they aren't easy to build. Learn from over a decade of designing and rolling out IT platforms.