Hi all,

I have a basic question regarding kafka consumer groups. I will detail it
with an example :


1.I run a console-producer on a topic and produce messages :


kafka-console-producer.sh --broker-list localhost:9092 --topic first_topic

>message1

>message2



2.I run console-consumer with —group first_group without —from-beginning


kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic
first_topic --group  first_group


(no messages come)



3. when  I described first_group using kafka-consumer-group , I see the
current offset is 2



Now I run console-consumer with —group second_group with —from-beginning I
see the messages  :


kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic
first_topic —group  second_group —from-beginning


message1

message2


My question here is , how with the first_group , based on --from-beginning
flag , current offset is set to 2 without actually reading any messages?


Please let me know If I am missing something basic here.


Thanks in advance.



Regards,

Sharmadha S.

Reply via email to