activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Burton <bur...@spinn3r.com>
Subject Re: ActiveMQ should GC inactive when producers is 0 , even if consumers is > 0
Date Sun, 01 Feb 2015 23:53:54 GMT
I created a JIRA for this.

https://issues.apache.org/jira/browse/AMQ-5557

I’m convinced this is the wrong behavior because there are legitimate race
conditions present here that can’t be solved without allowing ActiveMQ to
make the decision on GC.

On Sun, Feb 1, 2015 at 9:38 AM, Kevin Burton <burton@spinn3r.com> wrote:

> I think this is another RFE but I might be wrong.. it would be nice to see
> this fixed in AMQ.
>
> I have code that uses LOTS of ephemeral queues. It’s probably less than 1k
> total active queues at any one time, but if I don’t allow them to be GCd
> due to inactivity, it would EASILY grow and grow over months, overwhelming
> memory.
>
> I’m trying to implement code that closes the consumers on the backend ,
> but there are races.
>
> If I close a consumer, a message could come in JUST after I close it,
> which would mean it NEVER gets processed.
>
> This would yield to data loss.
>
> However, if ActiveMQ GCd the queue when producers = 0 , and messages = 0,
> *regardless* of the number of consumers, then I thinks we’re golden.
>
> I can listen to advisory queue message telling me that the queue was
> closed, and then release my resources/consumers on the client.
>
> But in the current situation I have to write lots of ugly code to close
> the consumer , and some JMX code to verify that the count stays zero …
>
> … of course one strategy that I just thought of is that I could wait until
> I get an advisory queue message that the queue is GCd , but then I have
> latency where 1-2 message could be idle for a few minutes before they’re
> eventually serviced.
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
>
>


-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message