-
Notifications
You must be signed in to change notification settings - Fork 162
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
Starting a standalone consumer #429
Comments
Hi @arjun289, you should be able to just call fetch in a loop for each partition. |
Thanks for your suggestion @dantswain. The real issue here is that there are stream processing chains implemented with flow-based programming. All these chains belong to a specific project which group these chains. As per the above suggestion, I will be creating a worker per chain which would call the fetch. However, will it take care of semantics that is supported for GenConsumer such as offset management? |
Ah. Maybe I didn’t understand your requirement. You can manually commit the offsets. However, I think you may be able to just use consumer groups with a single member. The cluster should just assign all partitions to that consumer, and then offset management should work as expected. |
Thanks, @dantswain I think I will go ahead with the |
Will it be helpful if I raise a PR with implementation to handle standalone consumer? |
Thanks for the offer @arjun289 I think your use case is not really outside the intended use case for consumer groups, so I’m not sure what value there would be in having another implementation. On the other hand, there are a few benefits to using the consumer group mechanism here. For example, if you accidentally start a duplicate consumer there will be no double-consuming of messages. |
@arjun289 the Starting a individual consumer can be done like this:
Not sure about the supervisor yet. |
Hi,
I have started using
kafka_ex
for one of my IoT projects.I have a requirement for standalone consumer which is not placed inside any consumer group. There is support in Kafka for the same, however in the codebase or docs I did not come across any such implementation.
The GenConsumer requires a
consumer_group
to start the process.Am I missing anything?
The text was updated successfully, but these errors were encountered: