what is bootstrap-server in kafka config?

It is the url of one of the Kafka brokers which you give to fetch the initial metadata about your Kafka cluster. The metadata consists of the topics, their partitions, the leader brokers for those partitions etc. Depending upon this metadata your producer or consumer produces or consumes the data. You can have multiple bootstrap-servers … Read more

How to see the retention for a particular topic in kafka

If you have altered a topic and want to view the topic configuration the following command will be helpful kafka-topics.sh –zookeeper localhost:2181 –describe –topics-with-overrides This will describe only the topics along with configurations that have configurations set that differ from the cluster defaults. If you want to view the configurations for all topic Either you … Read more

What is the difference in Kafka between a Consumer Group Coordinator and a Consumer Group Leader?

1. What is the difference? The consumer group coordinator is one of the brokers while the group leader is one of the consumer in a consumer group. The group coordinator is nothing but one of the brokers which receives heartbeats (or polling for messages) from all consumers of a consumer group. Every consumer group has … Read more

Kafka 0.11 how to reset offsets

By default, –reset-offsets just prints the result of the operation. To actually perform the operation you need to add –execute to your command: kafka-consumer-groups.bat –bootstrap-server kafka-host:9092 –group my-group –reset-offsets –to-earliest –all-topics –execute

What is the use of __consumer_offsets and _schema topics in Kafka?

__consumer_offsets is used to store information about committed offsets for each topic:partition per group of consumers (groupID). It is compacted topic, so data will be periodically compressed and only latest offsets information available. _schema – is not a default kafka topic (at least at kafka 8,9). It is added by Confluent. See more: Confluent Schema … Read more

How to send key, value messages with the kafka console producer

I found out the solution after some research and the solution is here. kafka-console-producer command kafka-console-producer.sh –broker-list localhost:9092 –topic topic-name –property “parse.key=true” –property “key.separator=:” After running this command you will enter in producer console and from there you can send key, value messages. For example key1:value1 key2:value2 key3:value3 For more clarity, I am providing sample … Read more

Exception in thread “main” joptsimple.UnrecognizedOptionException: zookeeper is not a recognized option

Newer versions(2.2+) of Kafka no longer requires ZooKeeper connection string –zookeeper localhost:2181 It throws the following exception while creating a topic Exception in thread “main” joptsimple.UnrecognizedOptionException: zookeeper is not a recognized option Instead, add Kafka Broker –bootstrap-server localhost:9092 connection string. ./kafka-topics.sh –create –topic test-topic –bootstrap-server localhost:9092 –replication-factor 1 –partitions 4