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

Clebert Suconic commented on ARTEMIS-2564:
------------------------------------------

Retry should have failed for the non DLQ. that's the bug, we should have either 
ignored the call, or thrown an error.

> Possible durable message count error with retryMessages()
> ---------------------------------------------------------
>
>                 Key: ARTEMIS-2564
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2564
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.10.1
>            Reporter: Anders Andersson
>            Priority: Minor
>
> There is a possible bug with {{retryMessages()}} JMX call.
> *Step 1:* Send messages to a queue
> {noformat}
> bin/artemis producer --user me --password mypassword --destination 
> queue://MESSAGING.QUEUE.3 --message TEST
> {noformat}
> Durable message count is 1000 and Durable persistence size is 394000. Message 
> count is 1000 and FirstMessageTimestamp is 1574947152841 for this queue. 
> First Message As Json has JSON text inside it.
> *Step 2:* Retry the messages
> It makes no sense to retry messages that hasn't gone to DLQ but that was what 
> I did:
> {noformat}
> http://my.happy.machine:8181/console/jolokia/exec/org.apache.activemq.artemis:broker=!%22amq-c!%22,component=addresses,address=!%22MESSAGING.QUEUE.3!%22,subcomponent=queues,routing-type=!%22anycast!%22,queue=!%22MESSAGING.QUEUE.3!%22/retryMessages()
> {noformat}
> Got 1000 back
> {{FirstMessageTimestamp}} is empty and {{FirstMessageAsJson}} is {{{}}} other 
> than that all fields above is unchanged. 
> It looks to me that when {{retryMessages()}} runs on messages that have not 
> been rollbacked enough times to reach DLQ removes the messages but does not 
> update message count. Better would be if {{retryMessages}} didn't remove 
> messages that have not been sent to DLQ, but as it is now it is reported to 
> be 1000 messages on the queue but it is empty when browsing it.
> {{resetMessageCounter()}} does not fix anything and {{removeAllMessages()}} 
> reports 0 and still 1000 messages in message count (no change to the other 
> fields either).
> Of course, this is not done that often and service is still running fine, so 
> it is a minor problem.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to