camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravi21588 <>
Subject Query in using Dynamic router EIP
Date Fri, 13 May 2016 12:09:44 GMT
Hi All,

I have a query related to dynamic router EIP.

The diagram in camel site shows the EIP has a Dynamic rule base store  and a
control channel .

I just saw the implemented example in Documentation

<bean id="mySlip" class="org.apache.camel.processor.DynamicRouterTest"/>
<camelContext xmlns="">
        <from uri="direct:start"/>
            <method ref="mySlip" method="slip"/>
        <from uri="direct:foo"/>
        <transform><constant>Bye World</constant></transform>

and the java bean mySlip handles the logic which 

 * Use this method to compute dynamic where we should route next.
 * @param body the message body
 * @return endpoints to go, or <tt>null</tt> to indicate the end
public String slip(String body) {
    if (invoked == 1) {
        return "mock:a";
    } else if (invoked == 2) {
        return "mock:b,mock:c";
    } else if (invoked == 3) {
        return "direct:foo";
    } else if (invoked == 4) {
        return "mock:result";
    // no more so return null
    return null;

can you please tell what is acting as a control channel and Dynamic rule
base store.

Does Dynamic rule base store means persistent data store?

Also in the EIP Book says as below.

During system start-up, each potential recipient sends a special message to
the Dynamic Router on this control channel, announcing its presence and
listing the conditions under which it can handle a message. The Dynamic
Router stores the 'preferences' for each participant in a rule base. When a
message arrives, the Dynamic Router evaluates all rules and routes the
message to the recipient whose rules are fulfilled. This allows for
efficient, predictive routing without the maintenance dependency of the
Dynamic Router on each potential recipient.

Can you please tell how does it happens?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message