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

   ### Summary
   
   The Go push consumer never actually reuses the receive attempt id: 
`WrapReceiveMessageRequest` generates a new id for every request, so the id 
handed down by the retry path is dropped, and empty results rotate it as well. 
When a receive response is lost, the retry cannot be recognized by the server 
as the same attempt. The Java client keeps the attempt id until messages are 
received (#1322); this PR aligns Go with it.
   
   ### Changes
   
   - Set the process queue's attempt id on the receive request so retries carry 
the same id.
   - Reuse the attempt id after any failed reception, not only 
`DeadlineExceeded`; an empty result (`MESSAGE_NOT_FOUND`) takes the same path.
   - Rotate the attempt id only after messages are received.
   
   ### How Did You Test This Change?
   
   - Added `TestProcessQueueKeepsAttemptIdUntilMessagesAreReceived` (failure → 
empty → messages → empty): the id is reused, rotated after messages, then 
reused again. The test fails without the fix.
   - `go test ./...` passes.
   


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