Hello,

I was trying to understand the effect of consumer liveliness and use of
resources at the same time, based on this article (which is great, btw):

https://www.confluent.io/blog/tutorial-getting-started-with-the-new-apache-kafka-0-9-consumer-client/

For my use case, I have only one consumer per group which is used in the
following way:

1) Instantiated with all properties.
2) poll messages
3) Process all messages and handles error
4) Commits offsets in sync.(no auto commit)
5) Closes all resources.

The above means that I will have a rebalance every time a consumer joins as
part of this consumer group. Because there is only 1 topic and 1 partition,
its not too troublesome at the moment. I would like to exploit multiple
partitions for scaling purposes. But I understand that having multiple
consumers doing the above steps means frequent rebalancing. But if Isimply
process everything in a while loop (until the server goes down), the
resources are never closed until a clean shutdown.

I was curious to know whether there is a practical answer to this.
Additionally, if anyone has implemented this across multiple
containers/servers in cloud, it would be good to know.

Also, apologies if any incorrect understading/assumption has been made.

Regards,

Reply via email to