Skip to content

[Bug] Proxy drops receipt handles when offline cleanup renewal fails #10933

Description

@Aias00

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions