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

allow.auto.create.topics": "false" for producer gives misleading warning #780

Closed
4 tasks
samba2 opened this issue May 18, 2022 · 2 comments
Closed
4 tasks

Comments

@samba2
Copy link

samba2 commented May 18, 2022

Description

While trying to workaround the auto-created topic when using GetMetadata() with the admin client, I found help in this issue: #726
The solution was to set the default for the underlying producer to "false": "allow.auto.create.topics": "false"

This works (tnx for documenting it in #726) but I get the following warning which is obviously wrong:
%4|1652854065.186|CONFWARN|rdkafka#producer-1| [thrd:app]: Configuration property allow.auto.create.topics is a consumer property and will be ignored by this producer instance

In fact the config did work and was not ignored. I could verify that since no topic was created when fetching with GetMetadata()

How to reproduce

// outputs %4|1652854065.186|CONFWARN|rdkafka#producer-1| [thrd:app]: Configuration property allow.auto.create.topics is a consumer property and will be ignored by this producer instance
func myfunc()  {
	a, err := confkafka.NewAdminClient(&confkafka.ConfigMap{
		"bootstrap.servers":        config.BrokerAddress,
		"allow.auto.create.topics": "false",
	})

	if err != nil {
		log.Fatalf("Failed to create Admin client: %v", err)
	}
	defer a.Close()
}

Checklist

Please provide the following information:

  • confluent-kafka-go and librdkafka version (LibraryVersion()): 1.8.2
  • Apache Kafka broker version: Confluent Kafka 7.0.1
  • Client configuration: see code example
  • Operating system: Linux
@jliunyu
Copy link
Contributor

jliunyu commented May 19, 2022

Thanks for reporting this, we are looking into it.

@milindl
Copy link
Contributor

milindl commented Nov 8, 2022

Closing with merge into librdkafka's master branch.

@milindl milindl closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants