Hi

The file component does not support multiple routes with the same uri.

If you need 5 different splitters, then you may want to have 1 file
route, and 5 splitter routes, and connect them with the direct
endpoint.


from file
  to direct split-me

for loop  {
  from direct split-me
  split
}


On Mon, May 28, 2012 at 11:06 AM, Charpente <charpente.ben...@gmail.com> wrote:
> Hi all,
>
> I'm using Camel 2.8.0.
>
> I have a simple route in a loop which realize a split with the attribute of
> a tag:
>
> for(int i=0; i<5; i++)
> {
>
>    from("file:message1.xml?noop=true")
>
> .split(ns.xpath("xmi:XMI/xmi:Extension/elements/element[@name=\""+i+"\"]"))
>    .to("file:splits/?fileName="+i+".xml");
>
> }
>
> My xml file have several tags "element", and the objective is to separate
> all of this tags with the attribute name.
>
> But when i start my camel-context, i've the follow error:
>
> /Caused by: org.apache.camel.FailedToStartRouteException: Failed to start
> route route2 because of Multiple consumers for the same endpoint is not
> allowed/
>
> It's difficult to example so if you are answers, ask me.
>
> Thanks
> Benoit.
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Route-in-a-loop-tp5713621.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to