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

kafka2 bugfix: Failed to assign partitions #519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leo198706
Copy link

  1. fluent-plugin-kafka 0.18.1
  2. fluentd 1.14.6

error.log

According to the above error, I analyzed the reasons as follows:

When Kafka does not have a topic to write to and does not allow automatic creation, an error UnknownTopicOrPartition will be reported, but it will be caught by Kafka::Error
https://github.com/fluent/fluent-plugin-kafka/blob/v0.18.1/lib/fluent/plugin/kafka_producer_ext.rb#L254

and finally thrown in rescue Exception => e.
https://github.com/fluent/fluent-plugin-kafka/blob/master/lib/fluent/plugin/out_kafka2.rb#L411

This is not an ideal situation.

So I adjusted the code to handle the above situation and avoid repeated retries.

Signed-off-by: Bing Wang <[email protected]>
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.

1 participant