On 20/03/2008, Robert Thullner <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I have configured some dynamic Camel Routes which all work when using Camel
> together with ActiveMq.
>
> The route looks like this
> from("activemq:queue:camel.train.plan.queue.router")
> .setHeader("endpointName",
> constant("statusInfo:camel.train.plan.queue.").append(
> new Expression() {
> public String evaluate(Exchange exchange) {
> Message in = exchange.getIn();
> String text = (String)in.getBody();
>
> String city="";
> //evaluate value of city of of text here
> return city;
> }
> }))
> .recipientList(header("endpointName"));
>
> With this route the receiver of a message is evaluated according to the
> content of a message.
>
> I now want to move this route to ServiceMix. But there routes look like
> this:
>
> from("jbi:endpoint:http://eip.splitter.servicemix/camelRouter/endpoint")
> .to("jbi:service:http://eip.splitter.servicemix/receiverNeusiedl");
>
> This means that I have to route a message to a JMS provider service-unit
> which will then forward the message to the receiver.
>
> But when I use dynamic routes, I would have to configure all possible
> endpoints in the JMS provider SU. Is that correct?
>
> Is there a way to avoid configuring all possible receivers in the SU and
> send a message to a JMS queue directly from the Camel JBI component?
You are free to communicate directly with JMS endpoints in your Camel
route if you want. You only need to use JBI endpoints when you want to
expose those endpoints on the NMR. If you choose to send messages to
JMS then you can consume those messages from inside another camel
route, some external JMS consumer or the JMS SU in ServiceMix.
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com