activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Burton <>
Subject ActiveMQ should GC inactive when producers is 0 , even if consumers is > 0
Date Sun, 01 Feb 2015 17:38:59 GMT
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

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.


Location: *San Francisco, CA*
… or check out my Google+ profile

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