-
Notifications
You must be signed in to change notification settings - Fork 335
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
[Issue 496] Support for correct reconnections limit in consumer #497
base: master
Are you sure you want to change the base?
[Issue 496] Support for correct reconnections limit in consumer #497
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@omnilight Thanks for work on this, when reconnectToBroker
fails, we should close the parentConsumer object. This pr is for the consumer side. Will the producer have the same problem?
5c57eae
to
24c8863
Compare
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? |
Hello! Any chance this PR will be accepted? @RobertIndie sorry for dm |
Hi @omnilight This PR looks good to me. But could you help resolve the conflicts? After that, I will review it again. Thanks. |
Yep, will fix that soon |
@RobertIndie Hi! I've rebases on latest master, please take a look |
Fixes #496
Motivation
Ability to set maximum number of reconnections to broker for consumer without consumer been stuck
Modifications
Closed() <-chan struct
to consumer interface to be able to control if consumer is closed when using itsChan()
methodClose()
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:
Closed()
methodDoes this pull request potentially affect one of the following parts:
Documentation