Message Flow: Routing and Filtering
Messages usually move in a system in a straight line, moving from one endpoint to the next. On occasion, however, a little bit of flexibility is required; a message might need to visit two different endpoints at the same time, or it might need to be conditionally sent to one and not another. The progression of messages through a system is like the progression of a steady stream; it takes skill and ingenuity (and care!) to safely route the flow.
In Spring Integration, a message router decides what channel or channels should receive the message next. This decision is based on the message's content ...