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
Remove warning for allow.auto.create.topics with producer #3952
Remove warning for allow.auto.create.topics with producer #3952
Conversation
d969ab3
to
c64de6e
Compare
Hi @edenhill : I'm stuck as to what's the best solution to the problem described above. I discussed a few different approaches with @emasab / @mhowlett and we thought this was the best way. The other approaches both won't change the property itself. All the approaches are:
|
allow.auto.create.topics is used by the producer too, so I think the proper fix is to remove _RK_CONSUMER from the configuration property and update the docstring to also explain the producer behaviour (i.e., referenced topics will be auto-created). |
Thanks, it sounds good and that's what I already have done in this PR (removed _RK_CONSUMER, and added doc for the different behaviors of this for producer and consumer) |
Please rebase this on latest master. Also make sure that you do not edit CONFIGURATION.md directly since it is auto-generated by Move the CHANGELOG entry to the 1.9.3 Enhancements section. |
c64de6e
to
a7855a2
Compare
Make sure to run the style-fixer (on linux, not osx): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of whitespace/style changes. Inspect your diffs before committing.
Also improves the documentation around this property. This solves the following problem: The property "allow.auto.create.topics" is supposed to be a consumer property, but we are setting it (and it is affecting the behaviour of) both the consumer and producer. It gives a warning if we change it in the producer, but works nevertheless. (the default value for the producer is true) One of the effects is that if a user is using their producer as an adminclient, a call to get metadata for a topic might create that topic, and if the user specifies allow.auto.create.topics, then they get a warning. Unfortunately, we even recommend using a producer with the above setting (see INTRODUCTION.md). A knock on effect is that both the go and python clients use a producer internally for their adminclients so the user has to either live with a call to GetMetadata creating topics, or with the warning. The java client only allows this property to be set on the consumer, which makes it more confusing.
a7855a2
to
3c78315
Compare
Fixed whitespace issues. Sorry about that, clang-format v14.0.0 did not work as expected, had to use v10.0.0. |
LGTM |
Also improves the documentation around this property.
This solves the following problem:
The property "allow.auto.create.topics" is supposed to be a consumer
property, but we are setting it (and it is affecting the behaviour of)
both the consumer and producer. It gives a warning if we change it in
the producer, but works nevertheless.
(the default value for the producer is true)
One of the effects is that if a user is using their producer as an
adminclient, a call to get metadata for a topic might create that
topic, and if the user specifies allow.auto.create.topics, then they
get a warning.
Unfortunately, we even recommend using a producer with the above
setting (see INTRODUCTION.md).
A knock on effect is that both the go and python clients use a producer
internally for their adminclients so the user has to either live with
a call to GetMetadata creating topics, or with the warning.
(ref: confluent-kafka-go/#780)
The java client only allows this property to be set on the consumer,
which makes it more confusing.