[ 
https://issues.apache.org/jira/browse/AMQ-4598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14324048#comment-14324048
 ] 

metatech commented on AMQ-4598:
-------------------------------

This fix works, but the queue size hides all the inflight messages because the 
counter goes immediately to 0, although inflight messages are still being 
processed.
The behaviour is different when a queue is not purged (all inflight messages 
are counted in) and when a queue is purged (inflight messages are not counted 
in).  
This would be more consistent to always reset the counter to the number of 
inflight messages in the queue (see attachment 
amq_negative_queue_size_after_purge.diff)


> Negative JMX QueueSize attribute in due to purging a queue
> ----------------------------------------------------------
>
>                 Key: AMQ-4598
>                 URL: https://issues.apache.org/jira/browse/AMQ-4598
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.8.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>             Fix For: 5.9.0
>
>         Attachments: amq_negative_queue_size_after_purge.diff
>
>
> If you purge a queue that has a bunch of messages prefetched you may end up 
> with a negative QueueSize in JMX as the prefetched messages get acked after 
> the purge. 
> This behavior should be considered a bug as many users depend on these JMX 
> statistics.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to