I am trying to use the @EndpointInject annotation in order to create a ProducerTemplate to bridge my POJO to the CamelContext (as described here http://camel.apache.org/pojo-producing.html).
The problem that I am running into is that the ProducerTemplate is injected into my POJO before all routes in the camel context are started. So when I call producerTemplate.send(...), I get a
DirectConsumerNotAvailableException: No consumers available on endpoint... error.
Is there anything that I need to do in order to ensure the CamelContext is started before trying to send to a route?