apache / apache/rocketmq

[Bug] Proxy drops receipt handles when offline cleanup task submission is rejected

Open
#10,941 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
3d 1h
Merged PRs (30d)
27

Description

## Problem

`DefaultReceiptHandleManager.clearGroup` removes a receipt-handle group from `receiptHandleGroupMap` before submitting its cleanup task to the bounded `returnHandleGroupWorkerService`.

If the executor rejects the submission because its queue is full or it is shutting down, `submit` throws and the removed group is not restored. The Proxy then loses the handle state without sending the intended clear/renew request and cannot retry it on the next scheduled scan.

## Expected behavior

A rejected cleanup submission must retain or restore the group so a later scheduled pass can retry cleanup. The rejection should be logged without leaking handle contents.

## Scope

Handle `RejectedExecutionException` around `clearGroup` task submission and add a regression test that forces rejection.

Contributor guide

Open the contributing guide

Research direction

Start in DefaultReceiptHandleManager.clearGroup and trace removal from receiptHandleGroupMap through submission to returnHandleGroupWorkerService. Add a regression test that forces task-submission rejection, verifies the group remains available for a later scheduled retry, and confirms logging does not expose handle contents.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.