Skip to content

Conversation

@BewareMyPower
Copy link
Contributor

@BewareMyPower BewareMyPower commented Oct 24, 2025

Fixes #483

Motivation

When the consumer is during reconnection (e.g. after seek is done), the Subscribe request might be sent to the broker but the connection is not bound with the consumer. In this case, closeAsync won't send a CloseConsumer RPC because connection is not available, see

Modifications

After subscribed successfully, verifying the state is Pending or Ready before changing to Ready. If not, send a CloseConsumer RPC to unregister the consumer. Add testCloseAfterSeek to verify it's fixed.

@BewareMyPower BewareMyPower added this to the 3.8.0 milestone Oct 24, 2025
@BewareMyPower BewareMyPower self-assigned this Oct 24, 2025
@BewareMyPower BewareMyPower added the bug Something isn't working label Oct 24, 2025
@BewareMyPower BewareMyPower marked this pull request as draft October 24, 2025 14:12
@BewareMyPower
Copy link
Contributor Author

Mark it as drafted first, I think a better solution for seek after seek case is to add the backoff, which could be much simpler. I will improve this PR next week.

@BewareMyPower BewareMyPower marked this pull request as ready for review November 4, 2025 09:35
@BewareMyPower
Copy link
Contributor Author

@nodece This fix is ready, PTAL

Copy link
Member

@nodece nodece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, LGTM

@BewareMyPower BewareMyPower merged commit 268aa4e into apache:main Nov 5, 2025
14 checks passed
@BewareMyPower BewareMyPower deleted the TEST branch November 5, 2025 10:58
BewareMyPower added a commit that referenced this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] client subscribe hang

2 participants