pulsar-client-go
pulsar-client-go copied to clipboard
[Issue 496] Support for correct reconnections limit in consumer
Fixes #496
Motivation
Ability to set maximum number of reconnections to broker for consumer without consumer been stuck
Modifications
- Added new method
Closed() <-chan structto consumer interface to be able to control if consumer is closed when using itsChan()method - For partitioned consumer added call of the parent's
Close()method in case when number of reconnections is limited. This fixes problem when consumer stuck in disconnected state.
Verifying this change
This change added tests and can be verified as follows:
- Added test for consumer closing on reaching max reconnection count
- Added test for new
Closed()method
Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not documented)
Added fix to prevent possible panic when pulsar returns error in consumer initialization step
@wolfstudy Hi, could you please review this PR?
Hello, do we have any ETA on this issue? Is it still planned for 0.8.0? Started using this lib recently and need this functionality badly
I also think this PR is important. I frequently find my consumer code stucked without knowing the underlying maximum number of reconnection had been reached.
@wolfstudy Could you please release this fix within the 0.9.0 release?
@wolfstudy Sorry for annoying you, but is it possible to include this PR into next release?
@wolfstudy Hi! Any changes should be made to accept this pr?