Kafka consumer stops listening to messages

377 Views Asked by At

My service has a Kafka consumer that listens to the messages from a topic. This has been working fine for over a year. But in the last couple of days, my Kafka consumer stopped listening to the Kafka topic two times, which seems strange to me. The consumer stops listening with the following logs:

Group coordinator aefgh5h4g413682594h05bb135766b2b-16272c2g4566122c.elb.eu-west-1.amazonaws.com:9094 (id: 2147483645 rack: null) is unavailable or invalid due to cause: session timed out without receiving a heartbeat response.isDisconnected: false. Rediscovery will be attempted.

Discovered group coordinator aefgh5h4g413682594h05bb135766b2b-16272c2g4566122c.elb.eu-west-1.amazonaws.com:9094 (id: 2147483645 rack: null)","logger_name":"org.apache.kafka.clients.consumer.internals.AbstractCoordinator

Attempt to heartbeat with Generation{generationId=7, memberId='consumer-service-1-8f7d95c3-aa50-4a51-ab3d-c99aaece955d', protocol='range'} and group instance id Optional.empty failed due to UNKNOWN_MEMBER_ID, resetting generation

Giving away all assigned partitions as lost since generation has been reset,indicating that consumer is no longer part of the group

Lost previously assigned partitions kafka_topic-0

(Re-)joining group

Offset commit failed on partition kafka_topic-0 at offset 2365944: The coordinator is not aware of this member.

OffsetCommit failed with Generation{generationId=7, memberId='consumer-service-1-8f7d95c3-aa50-4a51-ab3d-c99aaece955d

(Re-)joining group

Member consumer-service-1-7c2f402c-7659-4c8b-aeab-f24d1b21d940 sending LeaveGroup request to coordinator aefgh5h4g413682594h05bb135766b2b-16272c2g4566122c.elb.eu-west-1.amazonaws.com:9094 (id: 2147483645 rack: null) due to the consumer is being closed

Metrics scheduler closed

Closing reporter org.apache.kafka.common.metrics.JmxReporter

Metrics reporters closed

App info kafka.consumer for consumer-service-1 unregistered

If anyone had a similar problem or knows what happened here, and if he could share, I would be grateful.

I could not do much, since I can't reproduce this, and this is not something that happeneds everyday, so that I could figure out why it happens.

0

There are 0 best solutions below