You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Naira & Kobo <le...@gmail.com> on 2010/09/13 10:45:32 UTC

How to implement (dynamic) rule engine with camel.

Hi all,

I was just wondering what would be the best way to use camel to create
routes for an application that is highly dynamic.

When I say dynamic I mean, routing of message can change depending on use
case. I'd like to make this change without shutting down the camel (routing)
application (which is a sort of a rule engine). This means, when I have a
new use case, I 'd like to possible edit a scripting file and expect when
next a message arrives, the new rules are loaded and evaluated which
restarting the bundle.

This means, if I have endpoint A, B, C, D, E, F
The first use case can be: A -> D -> E -> F
The second use case: A -> B -> C -> F
Adding the second use case should require a restart of the camel
application. Is there anything that can do this today in camel. I think this
is some like a rule engine.

I hope my scenario is clear enough. Please, let me know if there is anything
unclear. 

Thanks.
-- 
View this message in context: http://camel.465427.n5.nabble.com/How-to-implement-dynamic-rule-engine-with-camel-tp2837427p2837427.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to implement (dynamic) rule engine with camel.

Posted by Willem Jiang <wi...@gmail.com>.
Camel internal API supports to change the camel route dynamically.
You can use JMX to export a route management interface or use 
webconsole[2] to change it.

[1] http://camel.apache.org/web-console.html

Willem

On 9/13/10 4:45 PM, Naira & Kobo wrote:
>
> Hi all,
>
> I was just wondering what would be the best way to use camel to create
> routes for an application that is highly dynamic.
>
> When I say dynamic I mean, routing of message can change depending on use
> case. I'd like to make this change without shutting down the camel (routing)
> application (which is a sort of a rule engine). This means, when I have a
> new use case, I 'd like to possible edit a scripting file and expect when
> next a message arrives, the new rules are loaded and evaluated which
> restarting the bundle.
>
> This means, if I have endpoint A, B, C, D, E, F
> The first use case can be: A ->  D ->  E ->  F
> The second use case: A ->  B ->  C ->  F
> Adding the second use case should require a restart of the camel
> application. Is there anything that can do this today in camel. I think this
> is some like a rule engine.
>
> I hope my scenario is clear enough. Please, let me know if there is anything
> unclear.
>
> Thanks.


Re: How to implement (dynamic) rule engine with camel.

Posted by GSegel <gs...@itsfac.com>.

Claus Ibsen-2 wrote:
> 
> Hi
> 
> The dynamic router EIP pattern
> http://camel.apache.org/dynamic-router.html
> 
> And you can add/remove routes at runtime using the CamelContext API.
> 
> 

Nice!  This will probably work for the issue I posted about also!
-- 
View this message in context: http://camel.465427.n5.nabble.com/How-to-implement-dynamic-rule-engine-with-camel-tp2837427p2838592.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to implement (dynamic) rule engine with camel.

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

The dynamic router EIP pattern
http://camel.apache.org/dynamic-router.html

And you can add/remove routes at runtime using the CamelContext API.


On Mon, Sep 13, 2010 at 10:45 AM, Naira & Kobo <le...@gmail.com> wrote:
>
> Hi all,
>
> I was just wondering what would be the best way to use camel to create
> routes for an application that is highly dynamic.
>
> When I say dynamic I mean, routing of message can change depending on use
> case. I'd like to make this change without shutting down the camel (routing)
> application (which is a sort of a rule engine). This means, when I have a
> new use case, I 'd like to possible edit a scripting file and expect when
> next a message arrives, the new rules are loaded and evaluated which
> restarting the bundle.
>
> This means, if I have endpoint A, B, C, D, E, F
> The first use case can be: A -> D -> E -> F
> The second use case: A -> B -> C -> F
> Adding the second use case should require a restart of the camel
> application. Is there anything that can do this today in camel. I think this
> is some like a rule engine.
>
> I hope my scenario is clear enough. Please, let me know if there is anything
> unclear.
>
> Thanks.
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-implement-dynamic-rule-engine-with-camel-tp2837427p2837427.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: How to implement (dynamic) rule engine with camel.

Posted by GSegel <gs...@itsfac.com>.

Naira &amp; Kobo wrote:
> 
> This means, if I have endpoints A, B, C, D, E, F
> The first use case can be: A -> D -> E -> F
> The second use case: A -> B -> C -> F
> Adding the second use case should require a restart of the camel
> application.
> 

Does Camel need to be restarted to switch between the first use case and the
second?  I thought this could be done programmatically?  Maybe the
difference is that you are wanting to do it via a scripting file...


-- 
View this message in context: http://camel.465427.n5.nabble.com/How-to-implement-dynamic-rule-engine-with-camel-tp2837427p2838590.html
Sent from the Camel - Users mailing list archive at Nabble.com.