|Site Home Patterns Home Table of Contents|
An application is using Messaging. However, it cannot process messages as fast as they’re being added to the channel.
How can a messaging client process multiple messages concurrently?
Create multiple Competing Consumers on a single channel so that the consumers can process multiple messages concurrently.
Competing Consumers are multiple consumers that are all created to receive messages from a single Point-to-Point Channel. When the channel delivers a message, any of the consumers could potentially receive it. The messaging system's implementation determines which consumer actually receives the message, but in effect the consumers compete with each other to be the receiver. Once a consumer receives a message, it can delegate to the rest of its application to help process the message. (This solution only works with Point-to-Point Channels; multiple consumers on a Publish-Subscribe Channel just create more copies of each message.)...
Related patterns: Event-Driven Consumer, Message, Message Channel, Message Dispatcher, Messaging, Point-to-Point Channel, Polling Consumer, Publish-Subscribe Channel, Transactional Client
Gregor Hohpe and Bobby Woolf
|Home Patterns Table of Contents||Previous Next|
|© 2003 Bobby Woolf All rights reserved.|