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

KAFKA-3697: Update quick start documentation to use the new consumer #1921

Closed
wants to merge 1 commit into from

Conversation

vahidhashemian
Copy link
Contributor

This is to imply that the Java consumer/producer are the recommended consumer/producer now.

@vahidhashemian
Copy link
Contributor Author

cc @ijuma @hachikuji

@@ -70,7 +70,7 @@

<h3><a id="consumerconfigs" href="#consumerconfigs">3.3 Consumer Configs</a></h3>

We introduce both the old 0.8 consumer configs and the new consumer configs respectively below.
We introduce both the old 0.8 consumer configs and the Java consumer configs respectively below.
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be just me, but it reads a little awkwardly to mention the "0.8 consumer configs" contrasted with the "Java consumer configs." Maybe no need to mention versions? Also maybe we should swap the order?

We introduce both the Java consumer configs and the older Scala consumer configs respectively below.

@@ -143,7 +143,7 @@
<tr>
<td>rebalance.max.retries</td>
<td colspan="1">4</td>
<td>When a new consumer joins a consumer group the set of consumers attempt to "rebalance" the load to assign partitions to each consumer. If the set of consumers changes while this assignment is taking place the rebalance will fail and retry. This setting controls the maximum number of attempts before giving up.</td>
<td>When a Java consumer joins a consumer group the set of consumers attempt to "rebalance" the load to assign partitions to each consumer. If the set of consumers changes while this assignment is taking place the rebalance will fail and retry. This setting controls the maximum number of attempts before giving up.</td>
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a mistaken find/replace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for all the mistaken find/replaces; and thanks for catching them. Will fix those in the next update.

<h4><a id="newconsumerconfigs" href="#newconsumerconfigs">3.3.2 New Consumer Configs</a></h4>
Since 0.9.0.0 we have been working on a replacement for our existing simple and high-level consumers. The code is considered beta quality. Below is the configuration for the new consumer:
<h4><a id="newconsumerconfigs" href="#newconsumerconfigs">3.3.2 Java Consumer Configs</a></h4>
Since 0.9.0.0 we have been working on a replacement for our existing simple and high-level consumers. The code is considered beta quality. Below is the configuration for the Java consumer:
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment seems a little old. While it's true that we're still working on it, it's more or less a completed product. Maybe we just say that it was introduce in 0.9.0.0? Also, we should remove the mention of "beta quality." We merged a PR about this previously, but it looks like we missed this.

@@ -128,7 +128,7 @@
<tr>
<td>auto.commit.enable</td>
<td colspan="1">true</td>
<td>If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer. This committed offset will be used when the process fails as the position from which the new consumer will begin.</td>
<td>If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer. This committed offset will be used when the process fails as the position from which the Java consumer will begin.</td>
Copy link
Contributor

Choose a reason for hiding this comment

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

Another mistaken find/replace.

@@ -372,7 +372,7 @@
<ol>
<li> Register itself in the consumer id registry under its group.
</li>
<li> Register a watch on changes (new consumers joining or any existing consumers leaving) under the consumer id registry. (Each change triggers rebalancing among all consumers within the group to which the changed consumer belongs.)
<li> Register a watch on changes (Java consumers joining or any existing consumers leaving) under the consumer id registry. (Each change triggers rebalancing among all consumers within the group to which the changed consumer belongs.)
Copy link
Contributor

Choose a reason for hiding this comment

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

Mistaken find/replace.

@@ -143,7 +143,7 @@
</pre>


Note, however, after 0.9.0, the kafka.tools.ConsumerOffsetChecker tool is deprecated and you should use the kafka.admin.ConsumerGroupCommand (or the bin/kafka-consumer-groups.sh script) to manage consumer groups, including consumers created with the <a href="http://kafka.apache.org/documentation.html#newconsumerapi">new consumer API</a>.
Note, however, after 0.9.0, the kafka.tools.ConsumerOffsetChecker tool is deprecated and you should use the kafka.admin.ConsumerGroupCommand (or the bin/kafka-consumer-groups.sh script) to manage consumer groups, including consumers created with the <a href="http://kafka.apache.org/documentation.html#newconsumerapi">Java consumer API</a>.
Copy link
Contributor

Choose a reason for hiding this comment

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

First sentence reads painfully. Maybe we could do it like this:

NOTE: Since 0.9.0.0, the kafka.tools.ConsumerOffsetChecker tool has been deprecated. You should use the kafka.admin.ConsumerGroupCommand (or the bin/kafka-consumer-groups.sh script) to manage consumer groups, including consumers...

@@ -40,9 +40,9 @@

The goal is to expose all the producer functionality through a single API to the client.

The new producer -
The Java producer
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if it's really necessary to mention Java. It's the only producer that we mention in this documentation, so can't we just call it the "Kafka Producer"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about this too. Then I noticed that there are references to "old producer" in the upgrade section. If that doesn't cause a confusion I would also like to use "Kafka producer".

@ijuma
Copy link
Contributor

ijuma commented Sep 29, 2016

I'm not really sure about this PR for 0.10.1, we have used the term "new producer" and "new consumer" quite a bit and it is perhaps a bit too early to remove that. Maybe we should merge this in trunk but leave 0.10.1 as is? My thinking is that in 0.10.1, -new-consumer is no longer needed and by next release, we have a good case for getting rid of the term. We would want to update the tool option documentation too, in that case.

@vahidhashemian
Copy link
Contributor Author

vahidhashemian commented Sep 29, 2016

@ijuma It makes sense that we hold on to the terms 'new consumer' and 'old consumer' a bit longer. How about updating the quick start examples to use the new consumer (which is part of this PR)? Should I open a separate minor PR to update those examples for 0.10.1?

@hachikuji
Copy link
Contributor

Seems like we could drop the "new" terminology for the producer at least. It's hardly new anymore and we don't even support the old one. As long as we continue supporting both consumers, however, the "new" word is useful to distinguish which one users should be using.

@ijuma
Copy link
Contributor

ijuma commented Sep 29, 2016

@hachikuji the old producers are still supported, they've just been deprecated (which only means that they will be removed in a future major release and that they won't be gaining new features).

@vahidhashemian updating the quick start examples sounds great. Also, the remaining "beta" note for the new consumer that I missed last time around should be fixed.

@hachikuji
Copy link
Contributor

@ijuma Fair enough. Looking through the documentation, we're not consistent on the usage. In most places, it's just "the producer," or even "the Java producer." I doubt anyone would care if we dropped the word "new" from the other mentions, but no strong preference here.

@ijuma
Copy link
Contributor

ijuma commented Sep 29, 2016

if we're not consistent already, then fair enough.

@vahidhashemian vahidhashemian changed the title KAFKA-3697: Refer to "new" consumer/producer as "Java" consumer/producer in the documentation KAFKA-3697: Update quick start documentation to use the new consumer Sep 29, 2016
@vahidhashemian
Copy link
Contributor Author

@ijuma @hachikuji Updated the PR as advised. Also dropped 'new' from producer mentions as per latest comments.

On a separate note, I've been wondering if there is anyway to stop outdated PR builds on Jenkins? Sometimes I push a few updates in a short timeframe and it would be helpful to stop the old builds to free up Jenkins resources. Thanks.

@@ -715,7 +715,7 @@
<li> Set the configuration property <tt>zookeeper.set.acl</tt> in each broker to true</li>
</ol>

The metadata stored in ZooKeeper is such that only brokers will be able to modify the corresponding znodes, but znodes are world readable. The rationale behind this decision is that the data stored in ZooKeeper is not sensitive, but inappropriate manipulation of znodes can cause cluster disruption. We also recommend limiting the access to ZooKeeper via network segmentation (only brokers and some admin tools need access to ZooKeeper if the new consumer and new producer are used).
The metadata stored in ZooKeeper is such that only brokers will be able to modify the corresponding znodes, but znodes are world readable. The rationale behind this decision is that the data stored in ZooKeeper is not sensitive, but inappropriate manipulation of znodes can cause cluster disruption. We also recommend limiting the access to ZooKeeper via network segmentation (only brokers and some admin tools need access to ZooKeeper if the new consumer and Java producer are used).
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this could be "... if the new Java consumer and producer clients are used."

@@ -900,9 +900,9 @@
</tbody>
</table>

<h4><a id="new_producer_monitoring" href="#new_producer_monitoring">New producer monitoring</a></h4>
<h4><a id="new_producer_monitoring" href="#new_producer_monitoring">Producer monitoring</a></h4>
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we may as well update the id as well?

@@ -70,9 +70,13 @@

<h3><a id="consumerconfigs" href="#consumerconfigs">3.3 Consumer Configs</a></h3>

We introduce both the old 0.8 consumer configs and the new consumer configs respectively below.
We introduce both the new Java consumer configs and the older Scala consumer configs respectively below.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe even more concisely: "We include both the new Java and the older Scala consumer configs below."


<h4><a id="oldconsumerconfigs" href="#oldconsumerconfigs">3.3.1 Old Consumer Configs</a></h4>
<h4><a id="newconsumerconfigs" href="#newconsumerconfigs">3.3.1 New Consumer Configs</a></h4>
In 0.9.0.0 we introduced a replacement for simple and high-level consumers. Below is the configuration for the new consumer:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe "In 0.9.0.0 we introduced the new Java consumer as a replacement for the older Scala-based simple and high-level consumers."

Also, would it make sense to move this to the paragraph above ("We introduce both...")?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. Please check the variation I used in the updated PR and let me know if it needs further modification. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, looks good.

@@ -715,7 +715,7 @@
<li> Set the configuration property <tt>zookeeper.set.acl</tt> in each broker to true</li>
</ol>

The metadata stored in ZooKeeper is such that only brokers will be able to modify the corresponding znodes, but znodes are world readable. The rationale behind this decision is that the data stored in ZooKeeper is not sensitive, but inappropriate manipulation of znodes can cause cluster disruption. We also recommend limiting the access to ZooKeeper via network segmentation (only brokers and some admin tools need access to ZooKeeper if the new consumer and new producer are used).
The metadata stored in ZooKeeper is such that only brokers will be able to modify the corresponding znodes, but znodes are world readable. The rationale behind this decision is that the data stored in ZooKeeper is not sensitive, but inappropriate manipulation of znodes can cause cluster disruption. We also recommend limiting the access to ZooKeeper via network segmentation (only brokers and some admin tools need access to ZooKeeper if the new Java consumer and producer clients are used).
Copy link
Contributor

Choose a reason for hiding this comment

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

The first sentence has some redundancy. Maybe something like this:

The metadata stored in ZooKeeper for the Kafka cluster is world-readable, but can only be modified by the brokers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in the updated PR. Thanks.

@@ -715,7 +715,7 @@
<li> Set the configuration property <tt>zookeeper.set.acl</tt> in each broker to true</li>
</ol>

The metadata stored in ZooKeeper is such that only brokers will be able to modify the corresponding znodes, but znodes are world readable. The rationale behind this decision is that the data stored in ZooKeeper is not sensitive, but inappropriate manipulation of znodes can cause cluster disruption. We also recommend limiting the access to ZooKeeper via network segmentation (only brokers and some admin tools need access to ZooKeeper if the new consumer and new producer are used).
The metadata stored in ZooKeeper for the Kafka cluster is world-readable, but can only be modified by the brokers. We also recommend limiting the access to ZooKeeper via network segmentation (only brokers and some admin tools need access to ZooKeeper if the new Java consumer and producer clients are used).
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to take out the second line? Seems helpful to know the reason. Probably just no need to mention znodes directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry my bad. I added it back.

@hachikuji
Copy link
Contributor

@vahidhashemian Left a minor comment on the recent commit. The rest LGTM.

asfgit pushed a commit that referenced this pull request Sep 30, 2016
This is to imply that the Java consumer/producer are the recommended consumer/producer now.

Author: Vahid Hashemian <vahidhashemian@us.ibm.com>

Reviewers: Jason Gustafson <jason@confluent.io>

Closes #1921 from vahidhashemian/KAFKA-3697

(cherry picked from commit d2a267b)
Signed-off-by: Jason Gustafson <jason@confluent.io>
@asfgit asfgit closed this in d2a267b Sep 30, 2016
@hachikuji
Copy link
Contributor

Merged to trunk and 0.10.1. Thanks for the patch!

efeg pushed a commit to efeg/kafka that referenced this pull request May 29, 2024
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.

3 participants