Search code examples
apache-kafkaspring-kafka

Kafka ConcurrentMessageListenerContainer stops consuming abruptly


I am using Spring kafka for consuming message using ConcurrentMessageListenerContainer , in production I am seeing it stops consuming the messages abruptly , without any errors , sometimes even a single consumer with the VM stops consuming while other consumers are still consuming (I have 15 partitions and 3 JVM , each has concurrency of 5).

When I restart the JVM , it starts consuming !!!

Is there anyway I can check periodically whether consumer had died or something and I can restart it without restarting the JVM !!


Solution

  • Most likely, the consumer thread is "stuck" in your code somewhere. I suggest you take a thread dump when this happens, to see what the thread is doing.