You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Hartmut Lang <ha...@ericsson.com> on 2012/03/12 11:33:50 UTC

SedaConsumer not removed on endpoint remove

My scenario is to dynamically add and remove routes through some kind of registration-service.
My routes have a seda input like:
from("seda://seda-id").to("http://hostame")

Now the problem is, that if i remove the route and endpoints during runtime, the related "SedaConsumer" threadpool stays alive.
And when i dynamically create the same route again, an additional "SedaConsumer" is created.
So i somehow have more and more "SedaConsumer" pools in my context.

Any ideas how to deal with that?

/Hartmut


Re: SedaConsumer not removed on endpoint remove

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I profiled an use-case which was adding/removing thousands of routes
on a daily basis, and found a number of leaks recently.

I logged a fair number of tickets to resolve this. There is some tickets here:
https://issues.apache.org/jira/browse/CAMEL-5042
https://issues.apache.org/jira/browse/CAMEL-5045
https://issues.apache.org/jira/browse/CAMEL-5046
https://issues.apache.org/jira/browse/CAMEL-5048
https://issues.apache.org/jira/browse/CAMEL-5049
https://issues.apache.org/jira/browse/CAMEL-5040
https://issues.apache.org/jira/browse/CAMEL-5072

And to remove a route you need to stop it first, before invoking
remove, using the API on CamelContext.

You can disable JMX for new routes which helps as well, by setting
registerNewRoutes=false.
Then new routes is not enlisted in JMX, so you wont have thread pools
mbean leaks.



On Mon, Mar 12, 2012 at 11:44 AM, Hartmut Lang
<ha...@ericsson.com> wrote:
> Good news!
> Is there a ticket-number for this?
>
> /Hartmut
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Montag, 12. März 2012 11:39
> To: users@camel.apache.org
> Subject: Re: SedaConsumer not removed on endpoint remove
>
> On Mon, Mar 12, 2012 at 11:33 AM, Hartmut Lang <ha...@ericsson.com> wrote:
>> My scenario is to dynamically add and remove routes through some kind of registration-service.
>> My routes have a seda input like:
>> from("seda://seda-id").to("http://hostame")
>>
>> Now the problem is, that if i remove the route and endpoints during runtime, the related "SedaConsumer" threadpool stays alive.
>> And when i dynamically create the same route again, an additional "SedaConsumer" is created.
>> So i somehow have more and more "SedaConsumer" pools in my context.
>>
>> Any ideas how to deal with that?
>>
>
> Its fixed in the next release.
>
>> /Hartmut
>>
>
>
>
> --
> 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/



-- 
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: SedaConsumer not removed on endpoint remove

Posted by Hartmut Lang <ha...@ericsson.com>.
Good news!
Is there a ticket-number for this?

/Hartmut
-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Montag, 12. März 2012 11:39
To: users@camel.apache.org
Subject: Re: SedaConsumer not removed on endpoint remove

On Mon, Mar 12, 2012 at 11:33 AM, Hartmut Lang <ha...@ericsson.com> wrote:
> My scenario is to dynamically add and remove routes through some kind of registration-service.
> My routes have a seda input like:
> from("seda://seda-id").to("http://hostame")
>
> Now the problem is, that if i remove the route and endpoints during runtime, the related "SedaConsumer" threadpool stays alive.
> And when i dynamically create the same route again, an additional "SedaConsumer" is created.
> So i somehow have more and more "SedaConsumer" pools in my context.
>
> Any ideas how to deal with that?
>

Its fixed in the next release.

> /Hartmut
>



--
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: SedaConsumer not removed on endpoint remove

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Mar 12, 2012 at 11:33 AM, Hartmut Lang
<ha...@ericsson.com> wrote:
> My scenario is to dynamically add and remove routes through some kind of registration-service.
> My routes have a seda input like:
> from("seda://seda-id").to("http://hostame")
>
> Now the problem is, that if i remove the route and endpoints during runtime, the related "SedaConsumer" threadpool stays alive.
> And when i dynamically create the same route again, an additional "SedaConsumer" is created.
> So i somehow have more and more "SedaConsumer" pools in my context.
>
> Any ideas how to deal with that?
>

Its fixed in the next release.

> /Hartmut
>



-- 
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/