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

update tutorial #573

wants to merge 2 commits into from

Conversation

Duncan-tree-zhou
Copy link

update tutorial for latest consumer api change of kafka.
ref: #564

update tutorial for latest consumer api change of kafka.
- 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

index.md Outdated
```
$ $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.

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

correct the mistake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants