We have an application in which the consumer reads the message, and the thread performs a number of actions, including access to the databases, before the message is released in another topic. The time between consuming and receiving a message in a stream can take several minutes. When a message is created in a new topic, a commit is performed to indicate that we have finished work on the message about the user's queue. For this reason, auto-lock is disabled.
I use a high-level consumer and I notice that the zookeeper and kafka session timeout because it is too long before we do anything in the consumer queue, so kafka finishes rebalancing every time the stream returns to read more from consumers βqueues, and it begins to take a long time before the consumer reads a new message after a while.
I can set the zookeeper session timeout very high so as not to make this problem, but then I need to adjust the rebalance parameters accordingly and kafka will not gain a new consumer for some time among other side effects.
What are my solutions to this problem? Is there a way to beat my heart with kafka and the zoo to be happy? Do I still have the same problems if I have to use a simple user?
apache-kafka kafka-consumer-api
Terry cumaranatunge
source share