I logged a ticket to introduce an API in Camel to make this easier in the future
https://issues.apache.org/jira/browse/CAMEL-7136

On Thu, Jan 16, 2014 at 8:51 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> Hi
>
> Ah if you use the spring's message listener container, then yeah you
> can start|stop that as well. In fact this is what camel-jms does under
> the hood.
>
> So there should not be a problem.
>
> Also a lot of people use spring jms so its well tested.
>
>
> On Thu, Jan 16, 2014 at 12:47 AM, Jeremy Ashley <jeremy.ash...@gmail.com> 
> wrote:
>> Thanks Claus,
>>
>> I looked at the running app via jconsole but didn't see anything useful in
>> the MBeans.  Ultimately I didn't use JMX.  Instead I've created a simple
>> custom message listener container factory along the lines below.
>>
>>
>> public class CustomMessageListenerContainerFactory
>>     implements MessageListenerContainerFactory {
>>
>>   private Map<JmsEndpoint, AbstractMessageListenerContainer> containers =
>> new HashMap<>();
>>
>>   @Override
>>   public AbstractMessageListenerContainer
>> createMessageListenerContainer(JmsEndpoint endpoint) {
>>     DefaultMessageListenerContainer messageListenerContainer = new
>> DefaultMessageListenerContainer();
>>     containers.put(endpoint, messageListenerContainer);
>>     return messageListenerContainer;
>>   }
>>
>>   public AbstractMessageListenerContainer
>> getMessageListenerContainer(JmsEndpoint endpoint) {
>>     return containers.get(endpoint);
>>   }
>> }
>>
>> This seems to do the trick as I can access and start/stop the containers
>> directly.  Can you see any gotchas with this approach?
>>
>> Thanks, Jeremy
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/starting-and-stopping-routes-created-via-spring-and-Consume-tp5745973p5746011.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cib...@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> Make your Camel applications look hawt, try: http://hawt.io



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Reply via email to