I have a kafka topic(XYZ) with just one partition and one consumer(C1) running on RHEL6 machine. I have copied the same setup on to a RHEL7 machine and stopped the C1 and started the new consumer(C2) using the same group id as the C1. C2 is able to connect, exchange heartbeat messages and print following debug statements repeatedly but not able to consume messages. Received zero records. It uses "earliest" offset reset but seems to ignore it. note: all consumer share the same code version.
Logs:
Fetcher: [Consumer clientId=testclient-0, groupId=mcu] Fetch READ_UNCOMMITTED request at offset 1001 for partition XYZ-0 returned fetch data (error=none, highWaterMark=1001, lastStableOffset=1001, logStartOffset=10 ....
Adding READ_UNCOMMITTED request for partiion...
Sending READ_UNCOMMITTED request for partition...
Resetting offset for partition XYZ-0 to the committed offset 1001
My question is why it is resetting offset to the latest offset value and not consume message from beginning.
Following is what i have tried to resolve the issue.
- I am able to consume message from C2 consumer from another topic on same cluster.
- I am able to consume message from same topic XYZ from another consumer C3 on a different RHEL 6 machine with exactly same configuration.
- I have used a new Group id but no success
- Produced message after staring the consumer first but no success. Note: Kafka client vaersion 1.0
Any help would be highly appreciated. Thank you.