camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <>
Subject Re: how to retrieve the consumer and/or producer created in an endpoint
Date Sun, 16 Sep 2012 17:05:34 GMT
That's a tricky question, but I think you can get both Producers and
Consumers from the API:

- Consumers are associated with routes. They are the starting point of a
route. Hence, if you do DefaultCamelContext.getRoute("X").getConsumer(),
you'll get the consumer for route with id X. You can also iterate over all
routes by using DefaultCamelContext.getRoutes().

- Producers are created dynamically and stored in a pool. You can access
this pool by doing: DefaultCamelContext.getProducerServicePool(), which
returns a ServicePool you can then explore. 

Check out both methods in the Javadoc: [1].

Nevertheless, may I ask you what exactly are you trying to achieve?


Raúl Kripalani 
Enterprise Architect, Program Manager, Open Source Integration specialist | | twitter: @raulvk 


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message