EAI Patterns with Actor Model: Content-Based Router

As noted in my discussion on Splitter, a Content-Based Router has a different motivation. While both of these router types are designed to route a message based on message content, the Content-Based Router doesn’t break up the composite parts of one message into multiple messages as does a Splitter. Rather, it routes the whole message based on some message content analysis.

The example used by the Enterprise Integration Patterns is an Order System that must route each Order to the Inventory System to check on Order Item availability. This assumes that a given Order has only those Order Items that are kept by one of two or more Inventory Systems. If, on the other hand, a single Order can have multiple Order Items each potentially kept by a different Inventory System, you’d need to use a Splitter to check on availability.

. . .

The full text is now available as part of my book Reactive Enterprise with Actor Model on Safari Books Online.