concept content - base router in category camel
appears as: content-based router, The content-based router

This is an excerpt from Manning's book Camel in Action.
2.6.1 Using a content-based router
Listing 4.11 The content-based router uses the bean as a predicate in XML
<bean id="customerService" class="camelinaction.CustomerService"/> #1 <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="file://target/order"/> <choice> <when> <method ref="customerService" method="isGold"/> #2 <to uri="mock:queue:gold"/> </when> <when> <method ref="customerService" method="isSilver"/> #3 <to uri="mock:queue:silver"/> </when> <otherwise> <to uri="mock:queue:regular"/> </otherwise> </choice> </route> </camelContext> #1 Declares the bean so you can refer to the bean in the upcoming route #2 The method call predicate that invokes the isGold method on the bean #3 The method call predicate that invokes the isSilver method on the bean