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

ASF GitHub Bot logged work on ARTEMIS-2564:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Dec/19 16:08
            Start Date: 03/Dec/19 16:08
    Worklog Time Spent: 10m 
      Work Description: brusdev commented on pull request #2904: ARTEMIS-2564 
retryMessages incorrectly removes msgs
URL: https://github.com/apache/activemq-artemis/pull/2904#discussion_r353271848
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 ##########
 @@ -1996,8 +1980,7 @@ private int iterQueue(final int flushLimit,
                   }
 
                   if (filter1 == null || filter1.match(ref.getMessage())) {
-                     messageAction.actMessage(tx, ref);
-                     if (remove) {
+                     if (messageAction.actMessage(tx, ref)) {
 
 Review comment:
   Why pageIterator loop [1] hasn't the same check?
   
   [1] 
https://github.com/jbertram/activemq-artemis/blob/ARTEMIS-2564/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java#L2015
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 352739)
    Time Spent: 20m  (was: 10m)

> 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
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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