Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tutorial #573

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 0.9 to latest with --new-consumer

Copy link
Author

@Duncan-tree-zhou Duncan-tree-zhou Mar 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two links for your ref:
kafka 0.10.0 tag quickstart_consume
kafka 0.10.1 tag quickstart_consume

i think new consumer api had been used as default api in 0.10.1 without --new-consumer
. As the links wroten, --zookeeper option is default for versions <= 0.10.0, and --bootstrap-server option is default for versions >= 0.10.1.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consult the source code for ConsoleConsumer rather than the html

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i find the latest tag of version 0.10.0 (0.10.0.1-rc2) and ealiest tag of version 0.10.1 (0.10.1.0) ,

ver 0.10.0.1-rc2

https://github.com/apache/kafka/blob/a7a17cdec9eaa6c57cc634da6a7c766d98d4160e/core/src/main/scala/kafka/tools/ConsoleConsumer.scala#L247

ver 0.10.1.0

https://github.com/apache/kafka/blob/3402a74efb23d1d4fef1e7284de8d4b151cde784/core/src/main/scala/kafka/tools/ConsoleConsumer.scala#L290

i think new consumer is the default option for the versions equal to and after 0.10.1.

```

- With earlier version of kafka (0.8.x ~ 2.0.x)

```
$ $KAFKA_HOME/bin/kafka-console-consumer.sh --topic=topic --zookeeper=$ZK

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say this is for < 0.9

```
- With kafka version between 0.10.x to 2.0.x, both scripts above are available.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Between 0.9 and latest 2.x


Running kafka-docker on a Mac:
==============================
Expand Down