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

Why ConsumerRebalanceListener is not expose when create a Consumer? #842

Open
marcosschroh opened this issue Jul 1, 2022 · 0 comments · May be fixed by #845
Open

Why ConsumerRebalanceListener is not expose when create a Consumer? #842

marcosschroh opened this issue Jul 1, 2022 · 0 comments · May be fixed by #845
Labels

Comments

@marcosschroh
Copy link

Hi,

Thanks for the work that you are doing!!

According to the code, the only way to use the ConsumerRebalanceListener is using the subscribe method, I was wondering: Why is not also possible to set a ConsumerRebalanceListener when a Consumer is created using the __init__? I think if we do this, the testing will become easier because of mocking and you won’t be force to use the subscribe method.

In the init method is used
self._subscription.subscribe(…) which accepts a ConsumerRebalanceListener argument, so I think it is possible to make it.

Ideally, I think both options should be possible. If the user set a new ConsumerRebalanceListenter using the subscribe method, it should prevail.

what do you think?

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

Successfully merging a pull request may close this issue.

1 participant