-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
issue with rdkafka_example when auto.create.topics.enable=true in kafka8 #22
Comments
librdkafka currently waits for a topic to show up in the broker metadata mapping before producing a message for it. |
This requires "auto.create.topics.enable=true" to be configured on the brokers. The automatic topic creation trigger (a topic-specific metadata request) is performed every second, as well as immediately when a new topic is added if at least one broker is up.
This issue should now be fixed. If the topic-object is created (with rd_kafka_topic_new()) when at least one broker is up the broker-side topic creation will be immediate, otherwise the topic will be auto-created on the broker within at most 1 second. Could you verify this on your end and then close the issue? Please update your master branch, rebuild librdkafka and do a 'make clean all' in examples/, then try your test again. Thanks |
The new patch seems to be working as I could see the new topic being created. Thanks for the quick turn around. |
Kafka 8 offers a feature where new topics are automatically created by the broker if a producer attempts to send messages to a non-existent topic. When 'auto.create.topics.enable=true' is set in Kafka 8, messages sent by the 'rdkafka_example producer' get black holed by the broker. FWIW: messages sent to existing topics when 'auto.create.topics.enable=true' works just fine.
To reproduce this condition, add 'auto.create.topics.enable=true' to the server.properties file and start the broker. You should find that kafka-consumer-producer.sh triggers the broker to create the new topics and works as advertised. But something goes wrong with rdkafka_example.
Thanks for continuing to maintain this project and looking into this issue.
-- Adam
The text was updated successfully, but these errors were encountered: