You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "guyinyou (via GitHub)" <gi...@apache.org> on 2026/06/11 06:35:05 UTC

[PR] [Go] Fix forwardToDeadLetterQueueLater incorrectly calling ackMessage instead of forwardToDeadLetterQueue [rocketmq-clients]

guyinyou opened a new pull request, #1266:
URL: https://github.com/apache/rocketmq-clients/pull/1266

       forwardToDeadLetterQueueLater was calling ackMessage0 and ackMessageLater instead of forwardToDeadLetterQueue0 and forwardToDeadLetterQueueLater, which would cause messages destined for the dead letter queue to be silently acknowledged and lost.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Go] Fix forwardToDeadLetterQueueLater incorrectly calling ackMessage instead of forwardToDeadLetterQueue [rocketmq-clients]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin merged PR #1266:
URL: https://github.com/apache/rocketmq-clients/pull/1266


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Go] Fix forwardToDeadLetterQueueLater incorrectly calling ackMessage instead of forwardToDeadLetterQueue [rocketmq-clients]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org