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 Mon, 02 Feb 2015 17:02:04 GMT
On Sun, Feb 1, 2015 at 8:22 PM, artnaseef <art@artnaseef.com> wrote:

> Something has me confused here.  If there is a consumer, why would messages
> sit around unconsumed?
>
>
If you want a queue to GC, you have to close any consumers on it.

So lets say the queue has been idle , with no messages, for 60 seconds.

at 61 seconds you close it.

at 62 seconds a new message comes in from a straggler.

Now that message sits around forever because there’s no way to no its there
and no way to have the queue GC itself.


> Also, I have trouble understanding why one would want the broker to remove
> a
> destination while it has a consumer --


Because of the above race … there’s no way to GC a queue and risk a message
coming in due to this race.

By allowing broker to GC the queue with a consumer attached you avoid this
problem.


> what is the consumer doing with the
> destination then, and what is expected to happen to the consumer?
>

The consumer should just allow itself to stay connected.

One problem is that I had THOUGHT that you could create a consumer to a
nonexistent queue, but I was wrong.  The queue is automatically created.  I
had thought you had to write a message to it first but I was wrong.


>
> Also, if messages are sitting in a queue, the queue cannot be GC'ed -
> otherwise the broker is losing messages.  A good solution there may be the
> use of message TTLs.
>

Well this is a problem too because then messages get lost.


> BTW, it sounds like the application may have a consumer leak.  Consumers
> can
> be thought of as the center of purpose for a destination.


So my issue is the situation where you have a wide number of queues.  My
application is generally working FINE but I have too problems:

1. AMQ memory grows VERY high with large numbers of queues.

2.  BULK Queue GC when I restart my daemons causes AMQ to come to a
complete halt for 30 minutes or more.

3.  I can’t release these queues to become GCd because to the race above.

So right now if AMQ could close inactive queues I would be set.

ANOTHER idea is some sort of Advisory queue message like “this queue is now
active again” … so if a straggler message comes in you can open another
consumer and consume the queue again.


-- 

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