|Site Home Patterns Home Table of Contents|
Continuing with the order processing example, let's assume that company management publishes price changes and promotions to large customers. Whenever a price for an item changes, we send a message notifying the customer. We do the same if we are running a special promotion, e.g. all widgets are 10% off in the month of November. Some customers may be interested in receiving price updates or promotions only related to specific items. If I purchase primarily gadgets, I may not be interested in knowing whether widgets are on sale or not.
How can a component avoid receiving uninteresting messages?
Use a special kind of Message Router, a Message Filter, to eliminate undesired messages from a channel based on a set of criteria.
The Message Filter has only a single output channel. If the message content matches the criteria specified by the Message Filter, the message is routed to the output channel. If the message content does not match the criteria, the message is discarded....
Related patterns: Content-Based Router, Message Router, Selective Consumer, Publish-Subscribe Channel, Recipient List
Gregor Hohpe and Bobby Woolf
|Home Patterns Table of Contents||Previous Next|
|© 2003 Bobby Woolf All rights reserved.|