[
https://issues.apache.org/jira/browse/AMQ-6188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15169731#comment-15169731
]
ASF GitHub Bot commented on AMQ-6188:
-------------------------------------
GitHub user bdjdev opened a pull request:
https://github.com/apache/activemq/pull/170
https://issues.apache.org/jira/browse/AMQ-6188 - reset BaseDestinatio…
Fix and test for https://issues.apache.org/jira/browse/AMQ-6188
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bdjdev/activemq AMQ-6188
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq/pull/170.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #170
----
commit c88bcedff0e498667db53af561ab01d03b286e0c
Author: Brian D. Johnson <[email protected]>
Date: 2016-02-26T20:19:50Z
https://issues.apache.org/jira/browse/AMQ-6188 - reset
BaseDestination.lastActiveTime each time a message is delivered to the broker.
----
> Queues containing PERSISTENT messages can be garbage collected due to
> Inactivity
> --------------------------------------------------------------------------------
>
> Key: AMQ-6188
> URL: https://issues.apache.org/jira/browse/AMQ-6188
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.13.0, 5.13.1
> Reporter: Brian D. Johnson
>
> It is possible for a queue to be garbage collected due to inactivity despite
> undelivered {{PERSISTENT}} messages being present on the queue.
> Order of events-
> * unused queue is marked for garbage collection due to inactivity
> * prior to garbage collection, an anonymous producer must comes online,
> sending one or more messages, then closing
> ** Note: the queue's {{lastActiveTime}} is not reset when an anonymous
> producer is created because they are not bound to a destination at creation.
> * queue with pending Message(s) is garbage collected
> A simple fix for this seems to be resetting
> {{BaseDestination#lastActiveTime}} to zero each time a message is sent
> ({{BaseDestination#messageDelivered(context, messageReference)}}).
> I'll submit a PR with a patch shortly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)