How to consume the consumed message from the kafka topic based on offset ? please provide example in confluent_kafka python

0 votes
Suppose the consumer has consumed the messages and it is not committed yet and we have many such messages.

How to consume the consumed message from the kafka topic based on offset ? please provide example in confluent_kafka python.
Aug 8 in Apache Kafka by N Amit
• 120 points
309 views

1 answer to this question.

0 votes

Hi@Amit,

You can pass --offset keyword in your command. Here’s the command to read records from the second partition starting at offset 6.

$ kafka-console-consumer --topic example-topic --bootstrap-server broker:9092 \
 --property print.key=true \
 --property key.separator="-" \
 --partition 1 \
 --offset 6
answered Aug 10 by MD
• 65,240 points

Related Questions In Apache Kafka

0 votes
1 answer

How to reset the offset of messages consumed from Kafka?

The reset option only prints the result ...READ MORE

answered Jul 9, 2018 in Apache Kafka by Shubham
• 13,450 points
8,363 views
0 votes
0 answers

how to delete the topic in kafka

How to stop Kafka server from crashing ...READ MORE

May 13 in Apache Kafka by sreeveena
• 140 points
132 views
0 votes
1 answer

How to commit message offsets in Kafka for reliable data pipeline?

You can use auto.commit.enable to allow Kafka ...READ MORE

answered Jul 9, 2018 in Apache Kafka by Shubham
• 13,450 points
1,141 views
+1 vote
13 answers

How can I delete all the messages from a Kafka topic?

To delete all the messages from a Kafka topic.  There are many approach ...READ MORE

answered Jun 19 in Apache Kafka by Pawan
• 380 points
119,637 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,454 views
0 votes
0 answers
0 votes
1 answer

How to read batch messages in confluent-kafka-python?

Hi@akhtar, You have to read the messages normally ...READ MORE

answered Apr 3 in Apache Kafka by MD
• 65,240 points
960 views
0 votes
1 answer

how can we delete the topic in kafka in kafkatool application ?

Hi@sreeveena, I am not sure but there may be ...READ MORE

answered May 13 in Apache Kafka by MD
• 65,240 points
196 views