2008/11/26 mta38 <[EMAIL PROTECTED]>: > > Hi all, > I have a global question about Camel behaviour. To be 'clear' as much as > possible I give an example : > > Suppose the following route (in Spring config file): > > <route> > <from uri="jms:queue:A"> > <multicast> > <to uri=" jms:queue:B"> > <to uri=" jms:queue:C"> > </multicast> > </route> > > <route> > <from uri="jms:queue:B"> > <process ref="processor1"> > > </route> > > <route> > <from uri=" jms:queue:C"> > <to ref=" processor2"> > </route> > > Message content, Consumer and provider behaviour are not important for my > question. > > My question is about the number of instance of processor1 and processor2 > Camel or Spring will construct. > > Is this number of instance depends on the value of "concurrentConsumer" > which can be specify to queue B and queue C ? > Thanks in advance for your answer.
If you give a reference to a bean or processor in Camel; it will typically look it up each time (in each consumer) so it is up to your IoC container (Spring/Guice/JNDI) to decide whether to return the same instance each time, to use a singleton or to use some kind of pool etc. Though there are places in Camel; particularly in the Java DSL - where you can pass the actual instance into the DSL; so it will just use that one instance in those cases. -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/