Skip to content

Conversation

@BewareMyPower
Copy link
Contributor

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

Call setCnx in connectionOpened before sending the Subscribe RPC. However, after that, seek or hasMessageAvailable might fail with ResultNotConnected after reconnection. Hence, add a subscribe promise to delay these RPCs after subscribe RPC is done.

Add testSeekAfterSeek and testCloseAfterSeek to verify the behavior.

@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.

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

1 participant