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?

HTH,
Raúl.

--- 
Raúl Kripalani 
Enterprise Architect, Program Manager, Open Source Integration specialist 
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk 

[1]
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/DefaultCamelContext.html



--
View this message in context: 
http://camel.465427.n5.nabble.com/how-to-retrieve-the-consumer-and-or-producer-created-in-an-endpoint-tp5719332p5719434.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to