...
Code Block | ||||
---|---|---|---|---|
| ||||
from("jms:queue:order") .choice() .when().header("type").isEqualTo("widget")).to("bean:widgetOrder") .when().header("type").isEqualTo("wombat")).to("bean:wombatOrder") .otherwise() .to("bean:miscOrder") .end(); |
...
Code Block | ||||
---|---|---|---|---|
| ||||
Predicate isWidget = header("type").isEqualTo("widget");
|
And then you can refer to it in the route as:
...