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

feat(out_rdkafka2): add parameter use_default_for_unknown_partition_error #491

Merged
merged 1 commit into from
May 30, 2023

Conversation

raytung
Copy link
Member

@raytung raytung commented May 27, 2023

Implements suggestion in #489 (comment)

…error`

Signed-off-by: Ray Tung <code@raytung.net>
@raytung raytung force-pushed the feat/out_rdkafka2_unknown_partition branch from 4dff548 to 51245c9 Compare May 27, 2023 07:46
@raytung raytung requested a review from ashie May 27, 2023 07:47
# RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION
when :unknown_partition
if @use_default_for_unknown_partition_error && actual_topic != @default_topic
log.debug "failed writing to topic '#{actual_topic}' with error '#{e.to_s}'. Writing message to topic '#{@default_topic}'"
Copy link
Member

@ashie ashie May 30, 2023

Choose a reason for hiding this comment

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

Shouldn't it be log.warn for this according to your comment in #489 (comment)?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I thought about it some more - because we require a config parameter to enter into this logic, I think it makes sense to debug log this instead since it is doing what it intends to do. And in the event where this config parameter is not set (default to false), it will simply bubble the exception upwards which will be logged by fluentd anyway.

Copy link
Member

Choose a reason for hiding this comment

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

Yep, it's reasonable.
Thanks for clarification.

@ashie ashie merged commit deb3d6f into fluent:master May 30, 2023
9 checks passed
@ashie
Copy link
Member

ashie commented May 30, 2023

Thanks!

@raytung raytung deleted the feat/out_rdkafka2_unknown_partition branch May 30, 2023 22:31
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.

None yet

2 participants