From e6943c2a11e0a62c4aed01bafbb631a910134a4d Mon Sep 17 00:00:00 2001 From: Duncan-tree-zhou <5753266+Duncan-tree-zhou@users.noreply.github.com> Date: Wed, 26 Feb 2020 22:51:43 +0800 Subject: [PATCH 1/2] update tutorial update tutorial for latest consumer api change of kafka. --- index.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/index.md b/index.md index 190db4b0..3c557ec7 100644 --- a/index.md +++ b/index.md @@ -49,9 +49,18 @@ $ $KAFKA_HOME/bin/kafka-console-producer.sh --topic=topic \ Start another shell and start a consumer: -``` -$ $KAFKA_HOME/bin/kafka-console-consumer.sh --topic=topic --zookeeper=$ZK -``` +- With later version of kafka (0.10.x ~ latest) + + ``` + $ $KAFKA_HOME/bin/kafka-console-consumer.sh --topic=topic --bootstrap-server=`broker-list.sh` + ``` + +- With earlier version of kafka (0.8.x ~ 2.0.x) + + ``` + $ $KAFKA_HOME/bin/kafka-console-consumer.sh --topic=topic --zookeeper=$ZK + ``` +- With kafka version between 0.10.x to 2.0.x, both scripts above are available. Running kafka-docker on a Mac: ============================== From 499e31d5066560c08d6220ab19daae509e0de7b3 Mon Sep 17 00:00:00 2001 From: Duncan-tree-zhou <5753266+Duncan-tree-zhou@users.noreply.github.com> Date: Mon, 16 Mar 2020 18:41:48 +0800 Subject: [PATCH 2/2] correct the mistake correct the mistake --- index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.md b/index.md index 3c557ec7..80949b21 100644 --- a/index.md +++ b/index.md @@ -49,18 +49,18 @@ $ $KAFKA_HOME/bin/kafka-console-producer.sh --topic=topic \ Start another shell and start a consumer: -- With later version of kafka (0.10.x ~ latest) +- With later version of kafka (version >= 0.10.1) ``` $ $KAFKA_HOME/bin/kafka-console-consumer.sh --topic=topic --bootstrap-server=`broker-list.sh` ``` -- With earlier version of kafka (0.8.x ~ 2.0.x) +- With earlier version of kafka (version <= 0.10.0) ``` $ $KAFKA_HOME/bin/kafka-console-consumer.sh --topic=topic --zookeeper=$ZK ``` -- With kafka version between 0.10.x to 2.0.x, both scripts above are available. + Running kafka-docker on a Mac: ==============================