-
-
Notifications
You must be signed in to change notification settings - Fork 533
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
Allow .subscribe() to accept array of topics #640
Comments
@WaleedAshraf it's not possible to pass an array but you can call |
@tulios, sorry, maybe I misunderstood the comment in other issues.
The groupId is the same, and the consumer is subscribed to multiple topics. |
Yes, this is possible and used in production. You can also do: |
Thanks, 👍 That solves my problem. I'll close this issue. |
As discussed in these comments,
#289 (comment)
#289 (comment)
by @ThisIsMissEm and @tulios.
The limitation on KafaJS is that it doesn't let you subscribe to multiple topics at once with an array of topics. That fixes the issues of having multiple consumers for multiple topics.
It's be something like
Implementation
It can be possible to pass the array of topics to
.subscribe()
method, and it will be used asconst topicsToSubscribe = []
here https://github.com/tulios/kafkajs/blob/master/src/consumer/index.js#L163The text was updated successfully, but these errors were encountered: