Skip to content

[fix] [broker] Fix negative subscription/consumer's unack-messages #24496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

poorbarcode
Copy link
Contributor

Motivation

Issue: negative unack-messages

  • Consumer-1 received messages.
  • Unload the topic.
  • The message may be sent to consumer-2, but the consumption of consumer-1 is still in progress now.
  • Consumer-1 and consumer-2 acknowledge the message concurrently.

unack-messages may be reduced twice in above scenario, you can reproduce the issue by the new test testAcknowledgeConcurrently

Modifications

  • Only reduce unack-messages who actually deleted messages successfully.
  • This PR also fixes the issue of the unack-messages is not accurate
  • The current PR does not fix the same issue when enable TXN, we need a separate PR to fix it

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode added this to the 4.1.0 milestone Jul 9, 2025
@poorbarcode poorbarcode self-assigned this Jul 9, 2025
@poorbarcode poorbarcode added type/bug The PR fixed a bug or issue reported a bug release/3.0.13 release/4.0.6 release/3.3.8 labels Jul 9, 2025
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test release/3.0.13 release/3.3.8 release/4.0.6 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant