your CustomComponent class should only be instantiated once per CamelContext,
but there can be multiple Consumer & Producer instances in a given context
(one per route reference)


Edwin wrote
> 
> Hi Folks
> 
> I am referencing the same camel endpoint from 2 different routes.
> 
> E.g.
> customcomponent:custom-uri is being referenced from the 2 routes below
> from(“customcomponent:custom-uri”).to(…….
> from(“file:myfile?fileProperties..”).to(“customcomponent:custom-uri”);
> 
> I notice that the corresponding camel component(customcomponent) is
> instantiated twice - hence endpoint instantiated twice also.
> 
> I would have expected it only to be instantiated once, i.e. component,
> endpoint, consumer and producer shared between the 2 different routes.
> 
> Could you please confirm whether this behaviour is as expected
> 
> Thanks
> Edwin
> 


-----
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: 
http://camel.465427.n5.nabble.com/Custom-Camel-Component-instantiated-twice-tp5714297p5714302.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to