Hi Serge,

On Nov 9, 2007 9:19 AM, ssv <[EMAIL PROTECTED]> wrote:
>
> Thanks for so rapid response :)
>
> I'm still a bit confused :).
>
> 1. I still think it's a splitter (next rule in router if you preffer). In
> sources you can see that abstract processor (ProcessorType class) return
> ref. to itself after the processing URI:
>
>     public Type to(String uri) {
>         addOutput(new ToType(uri));
>         return (Type) this;
>     }
>

The *Type classes are just builders.  You would have to look at how
the builder actually wires up the processors to see the processing
pattern.

>
> For me it means:  from("a").to("b").to("c") is just the short form for this
> two rules: from("a").to("b") and from("a").to("c")

It's not. from("a").to("b").to("c") builds a processing graph that looks like
consumer:"a"  {
  pipeline{ producer:"b", producer:"c" }
}

so this is basically equivalent to
from("a").to("b", "c"), which might (I'd have to double check) produce
the following processing graph, but logically it will still have the
same semantics.

consumer:"a"  {
  pipeline{ pipeline( producer:"b", producer:"c"} }
}


The pipeline processor is what joins all the basic steps in a camel
DSL.  That is why you will always see it as the first processor hit
when a consumer sends in a message.

>
> if not - than I'm a bit confused with transactions :)
>
> from("a").policy(requiresnew).to("b").to("c").to("d")
>
> if it's a chain - policy "requiresnew" applyed only to the route a->b or to
> rotes b->c and c->d (tx could be toooooo long)?
>

the policy is applied to all subsequent steps.  When that pipeline
gets assembled, the processors will look something like:

consumer:"a"{
  pipeline{
     policy:"requiresnew"{ pipeline{ producer:"b", producer:"c",
producer:"d" } }
  }
}

>
> 2. Pipeline looks like the right way to define from "A" via the "B" to "C":
>     from("jms:A").pipeline("bean:example").to("jms:B")
>
>
> I'm reading the sources and trying to understand the DSL semantic, basically
> it's clear - but would be nice to have a short confirmation from the
> commiters.
>
> //sv
>
>
>
> Hadrian Zbarcea wrote:
> >
> > Hi,
> >
> > Thanks for your interest in camel.
> >
> > 1.  Your syntax defines a chain.  Your answer 1a is the correct one.  If
> > you need a splitter there is Splitter processor you could use:
> > http://activemq.apache.org/camel/splitter.html.
> >
> > 2. Again your first answer is the correct one.  The chain can be
> > interrupted though if a Processor in the chain throws an exception.
> > That is if your bean:example throws an exception jms:queueB won't be
> > invoked anymore.
> >
> > br,
> > Hadrian
> >
>
> --
> View this message in context: 
> http://www.nabble.com/Basic-route-builder-quesion-%28and-bean-end-points%29-tf4777060s22882.html#a13667701
>
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Reply via email to