[Bug] Proxy drops receipt handles when offline cleanup renewal fails
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- java
- Domain
- backend, distributed-systems
Research direction
Start at DefaultReceiptHandleManager.clearGroup and trace the ReceiptHandleGroup callback and RenewEvent future for the CLEAR_GROUP path. Add the regression test described in the issue for a failed offline cleanup renewal; done means failed renewal retains the receipt handle while successful renewal removes it.
Written by the indexing model from the issue text.
Description
Problem
When a consumer channel goes offline, DefaultReceiptHandleManager.clearGroup asynchronously renews each receipt handle with CLEAR_GROUP. The cleanup callback currently returns CompletableFuture.completedFuture(null) immediately instead of the RenewEvent future.
As a result, ReceiptHandleGroup removes the handle before the renewal outcome is known. If the renewal request fails, the handle is no longer retained or retried by the renewal scheduler.
Expected behavior
A receipt handle should be removed only after its CLEAR_GROUP renewal succeeds. On failure it should remain in the group so subsequent cleanup scheduling can retry it.
Proposed fix
Return the RenewEvent future from the ReceiptHandleGroup callback, mapping a successful result to null (remove) while preserving exceptional completion (retain). Add a regression test covering a failed offline cleanup renewal.
Scope
Proxy POP receipt-handle lifecycle; no protocol/API changes.
- Dominant language
- Java
- Stars
- 22.6k
- Forks
- 12k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/rocketmq
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
[Bug] TopicValidator rejects V2 retry topic names containing `+` separator introduced by KeyBuilder Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100