camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Dispatch Array 2 dimension to many routes
Date Tue, 23 Apr 2013 08:04:23 GMT
Hi

Sometimes its easier to just use a camel bean / processor. And then
use the producer template to send the messages to other routes.

http://camel.apache.org/producertemplate.html

You can also dependency inject the destinations in the bean
http://camel.apache.org/pojo-producing.html



On Mon, Apr 22, 2013 at 4:37 PM, kikou1984 <hichem.oueslati@atos.net> wrote:
> Hi,
>
> I got this bean:
>
> public ArrayList<ArrayList&lt;String>> Dispatch(Exchange exchange){
> ....
> ArrayList<ArrayList&lt;String>> lstOflst = new ArrayList <ArrayList
> <String>>();
> ...
> exchange.getOut().setBody(lstOflst);
> return lstOflst ;
> }
>
> lstOflst  is an ArrayList 2 dimension which contains ArrayList<String>.
>                 ArrayList <String> lst1 = lstOflst.get(0);
>                 ArrayList <String> lst2 = lstOflst.get(1);
>
> I want to know which EIP should i use to dispatch only the lst1 to a routeA
> and the lst2 to a routeB.
>
> Thxs for u help.
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Dispatch-Array-2-dimension-to-many-routes-tp5731266.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message