You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jason Dillon <ja...@planet57.com> on 2012/01/26 23:13:16 UTC

camelContext.suspend() and JmsComponent

Will suspending the context that a JmsComponent has active endpoints in, cause the JMS connection.stop() to be called?

I'm looking for the best/right method to quickly disable message flow inside of Camel using JMS components.

Anyone know off hand if camelContext.suspend() will do the right thing here for JmsComponent?

--jason

Re: camelContext.suspend() and JmsComponent

Posted by Jason Dillon <ja...@planet57.com>.
When would a component ever get suspended?

I'm trying to get a quick Connection.stop() called which I guessed (wrongly) that suspend() would eventually do.  Though after looking at thing closer, I'm using the ActiveMQ PooledConnectionFactory and it doesn't even support a way to call stop() on its pooled connections, so I will have to go hack around that anyways.

:-\

--jason


On Jan 26, 2012, at 8:44 PM, Claus Ibsen wrote:

> On Thu, Jan 26, 2012 at 11:46 PM, Jason Dillon <ja...@planet57.com> wrote:
>> It doesn't appear that camelContext.suspend() even attempts to suspend() its components... is that expected?
>> 
> 
> Yes, suspend() is for suspending route *consumers only*.
> So the routes does not intake new messages, but all the other route
> services are still "hot".
> 
> 
> 
>> --jason
>> 
>> On Jan 26, 2012, at 2:13 PM, Jason Dillon wrote:
>> 
>>> Will suspending the context that a JmsComponent has active endpoints in, cause the JMS connection.stop() to be called?
>>> 
>>> I'm looking for the best/right method to quickly disable message flow inside of Camel using JMS components.
>>> 
>>> Anyone know off hand if camelContext.suspend() will do the right thing here for JmsComponent?
>>> 
>>> --jason
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/


Re: camelContext.suspend() and JmsComponent

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Jan 26, 2012 at 11:46 PM, Jason Dillon <ja...@planet57.com> wrote:
> It doesn't appear that camelContext.suspend() even attempts to suspend() its components... is that expected?
>

Yes, suspend() is for suspending route *consumers only*.
So the routes does not intake new messages, but all the other route
services are still "hot".



> --jason
>
> On Jan 26, 2012, at 2:13 PM, Jason Dillon wrote:
>
>> Will suspending the context that a JmsComponent has active endpoints in, cause the JMS connection.stop() to be called?
>>
>> I'm looking for the best/right method to quickly disable message flow inside of Camel using JMS components.
>>
>> Anyone know off hand if camelContext.suspend() will do the right thing here for JmsComponent?
>>
>> --jason
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: camelContext.suspend() and JmsComponent

Posted by Jason Dillon <ja...@planet57.com>.
It doesn't appear that camelContext.suspend() even attempts to suspend() its components... is that expected?

--jason

On Jan 26, 2012, at 2:13 PM, Jason Dillon wrote:

> Will suspending the context that a JmsComponent has active endpoints in, cause the JMS connection.stop() to be called?
> 
> I'm looking for the best/right method to quickly disable message flow inside of Camel using JMS components.
> 
> Anyone know off hand if camelContext.suspend() will do the right thing here for JmsComponent?
> 
> --jason