RongtongJin commented on code in PR #1266:
URL: https://github.com/apache/rocketmq-clients/pull/1266#discussion_r3393811741


##########
golang/process_queue.go:
##########
@@ -177,10 +177,10 @@ func (dpq *defaultProcessQueue) 
forwardToDeadLetterQueueLater(mv *MessageView, a
                        if err := recover(); err != nil {
                                dpq.consumer.cli.log.Errorf("[Bug] Failed to 
schedule message change invisible duration request, mq=%s, messageId=%s, "+
                                        "clientId=%s", dpq.mqstr, messageId, 
clientId)
-                               dpq.ackMessageLater(mv, 1+attempt, callback)
+                               dpq.forwardToDeadLetterQueueLater(mv, 
1+attempt, callback)
                        }
                }()
-               dpq.ackMessage0(mv, attempt, callback)
+               dpq.forwardToDeadLetterQueue0(mv, attempt, callback)

Review Comment:
   This fixes the retry target, but this PR still leaves the `code != OK` 
branch in `forwardToDeadLetterQueue0` without a `return`. After scheduling this 
retry, execution falls through to `callback(nil)`, so callers can evict the 
message before the DLQ forward actually succeeds. Please include the missing 
`return` from the retry branch as well, or make this PR depend on/rebase on the 
PR that adds it.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to