java - Camel: Content based routing, from different froms -
i have 2 programs, made of 3 routes.
[ 1 route, jpa database bean. 1 copier, file scheme endpoint file scheme endpoint ] [ 1 uploader, file scheme endpoint bean. ]
i want run 1 programme based on input property file
<context:property-placeholder location="./run.properties" ignore-resource-not-found="false" />
but can find content-based-routing, examples take below from. eg.
from("direct:start") .choice() .when(body().contains("camel")) .loadbalance().roundrobin().to("mock:foo").to("mock:bar") .otherwise() .to("mock:result");
i want way rearrange this:
choice() .when(body().contains("camel")) from("direct:start1").loadbalance().roundrobin().to("mock:foo").to("mock:bar") .otherwise() from("direct:start2").to("mock:result");
you don't need content based routing command whether routes started...
just utilize autostartup(boolean)
api command this...
for example...
from("activemq:queue:special").autostartup("{{startuprouteproperty}}").to("file://backup");
see http://camel.apache.org/configuring-route-startup-ordering-and-autostartup.html
java apache-camel apache-karaf fuseesb
No comments:
Post a Comment