How to create Apache Kafka consumer groups?

I’m quite new to Kafka and trying to implement a simple queue system using 1 topic and 1 consumer group assigned to that topic. However I couldn’t figure out how to create a consumer group. I’m using Kafka_ex library and Kafka version 2.4.1

Hey Kgllev. Why don’t you try to use Rabbitmq… it uses Erlang behind the scenes and it’s simpler than Kafka. I can show you an example if you need help because I have been using it on my projects.

I use Docker to separate things… so my rabbimq is isolated in its own container.

https://www.rabbitmq.com/tutorials/tutorial-one-elixir.html

1 Like

I believe this is done fully by Application config, at least it is in apps at work. The consumer_group and auto_offset_reset go into the consumer group setup, and will automatically be created if it doesn’t exist.

We recently switched to brod and have had better luck with it in production.

2 Likes

Thank you for the feedback :nerd_face:. Turns out the default consumer group is “kafka_ex”. I’ll take a look at brod