Skip to content
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

Disable consumer auto reconnect #219

Open
fecet opened this issue Aug 3, 2024 · 1 comment
Open

Disable consumer auto reconnect #219

fecet opened this issue Aug 3, 2024 · 1 comment

Comments

@fecet
Copy link

fecet commented Aug 3, 2024

Could you provide an option to set the client's automatic reconnection strategy? I would like to use the admin API to force delete a subscription, but currently, the consumer immediately reconnects after being disconnected, causing the subscription to be recreated.

per apache/pulsar#22423

@BewareMyPower
Copy link
Contributor

Currently not. Java client does not have the similar feature as well. You'd like to make the reconnection backoff configurable, right? So you can manually delay the first reconnection.

However, it would affect the normal case. For example, if you configured it as 5 seconds, then even if the connection was disconnected due to some network issues, the consumer still required 5 seconds to recover.

IMO, a good idea is to add a new field to the protocol that tells the clients not to reconnect within some time. You can also add a discussion for the feature in https://lists.apache.org/[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants