![]() |
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 Diser on a channel that will consume messages from a channel and distribute them to performers.
A Message Diser consists of two parts:
- Diser – The object that consumes messages from a channel and distributes each message to a performer.
- Performer – The object that is given the message by the diser and processes it.
When a Message Diser receives a message, it obtains a performer and dises 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 diser, 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 diser may match a message to a specialized performer based on properties of the message.

Message Diser 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