You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by pholik1 <pe...@kb.cz> on 2018/11/08 12:49:55 UTC

Expiration of all messages in queue does not trigger autodelete

Hello,

when there is autocreated queue with messages and theese messages expires,
the queue is left abandoned on server until somebody connects to it and
disconects - it triggers QueueManagerImpl.run() which destroys the queue. In
my opinion there should be some code for check if queue is eligble for
autodelete in ExpiryScanner.

Or is this behavior expected?

Sincerely Petr Holik



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Expiration of all messages in queue does not trigger autodelete

Posted by Justin Bertram <jb...@apache.org>.
BTW, I assume you're talking about ActiveMQ Artemis since you're
referencing QueueManagerImpl and ExpiryScanner (which are both classes in
the Artemis code-base but not in the 5.x code-base).


Justin

On Fri, Nov 9, 2018 at 9:54 AM Justin Bertram <jb...@apache.org> wrote:

> I believe you can get the behavior you want in 2.7.0 via ARTEMIS-1856
> [1].  You'll just need to configure a non-zero delay so that the broker
> schedules the AddressQueueReaper.
>
>
> Justin
>
> [1] https://issues.apache.org/jira/browse/ARTEMIS-1856
>
> On Fri, Nov 9, 2018 at 9:45 AM Tim Bain <tb...@alumni.duke.edu> wrote:
>
>> When the messages expire, are they actually deleted from the broker? By
>> default, there is nothing that will delete the expired messages in the
>> absence of a consumer (or queue browser), so it might be that the queue
>> isn't being deleted because it isn't actually empty.
>>
>> If that is indeed what's going on and you'd like ActiveMQ to behave
>> differently (probably to have the broker periodically check for expired
>> messages and delete them, even if there's no consumer), you can submit an
>> enhancement request in JIRA for it.
>>
>> Tim
>>
>> On Thu, Nov 8, 2018, 11:23 AM pholik1 <petr_holik@kb.cz wrote:
>>
>> > Hello,
>> >
>> > when there is autocreated queue with messages and theese messages
>> expires,
>> > the queue is left abandoned on server until somebody connects to it and
>> > disconects - it triggers QueueManagerImpl.run() which destroys the
>> queue.
>> > In
>> > my opinion there should be some code for check if queue is eligble for
>> > autodelete in ExpiryScanner.
>> >
>> > Or is this behavior expected?
>> >
>> > Sincerely Petr Holik
>> >
>> >
>> >
>> > --
>> > Sent from:
>> > http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>> >
>>
>

Re: Expiration of all messages in queue does not trigger autodelete

Posted by pholik1 <pe...@kb.cz>.
Hello Justin,

thanks for reply. 

I've looked over your PR, and its definitely what I need.

Have a nice day!
Petr



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Expiration of all messages in queue does not trigger autodelete

Posted by Justin Bertram <jb...@apache.org>.
I believe you can get the behavior you want in 2.7.0 via ARTEMIS-1856 [1].
You'll just need to configure a non-zero delay so that the broker schedules
the AddressQueueReaper.


Justin

[1] https://issues.apache.org/jira/browse/ARTEMIS-1856

On Fri, Nov 9, 2018 at 9:45 AM Tim Bain <tb...@alumni.duke.edu> wrote:

> When the messages expire, are they actually deleted from the broker? By
> default, there is nothing that will delete the expired messages in the
> absence of a consumer (or queue browser), so it might be that the queue
> isn't being deleted because it isn't actually empty.
>
> If that is indeed what's going on and you'd like ActiveMQ to behave
> differently (probably to have the broker periodically check for expired
> messages and delete them, even if there's no consumer), you can submit an
> enhancement request in JIRA for it.
>
> Tim
>
> On Thu, Nov 8, 2018, 11:23 AM pholik1 <petr_holik@kb.cz wrote:
>
> > Hello,
> >
> > when there is autocreated queue with messages and theese messages
> expires,
> > the queue is left abandoned on server until somebody connects to it and
> > disconects - it triggers QueueManagerImpl.run() which destroys the queue.
> > In
> > my opinion there should be some code for check if queue is eligble for
> > autodelete in ExpiryScanner.
> >
> > Or is this behavior expected?
> >
> > Sincerely Petr Holik
> >
> >
> >
> > --
> > Sent from:
> > http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
> >
>

Re: Expiration of all messages in queue does not trigger autodelete

Posted by Tim Bain <tb...@alumni.duke.edu>.
When the messages expire, are they actually deleted from the broker? By
default, there is nothing that will delete the expired messages in the
absence of a consumer (or queue browser), so it might be that the queue
isn't being deleted because it isn't actually empty.

If that is indeed what's going on and you'd like ActiveMQ to behave
differently (probably to have the broker periodically check for expired
messages and delete them, even if there's no consumer), you can submit an
enhancement request in JIRA for it.

Tim

On Thu, Nov 8, 2018, 11:23 AM pholik1 <petr_holik@kb.cz wrote:

> Hello,
>
> when there is autocreated queue with messages and theese messages expires,
> the queue is left abandoned on server until somebody connects to it and
> disconects - it triggers QueueManagerImpl.run() which destroys the queue.
> In
> my opinion there should be some code for check if queue is eligble for
> autodelete in ExpiryScanner.
>
> Or is this behavior expected?
>
> Sincerely Petr Holik
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>