Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
Signed-off-by: Bing Wang <[email protected]>
  • Loading branch information
leo198706 committed Sep 29, 2024
1 parent f799f61 commit 42c6c22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions lib/fluent/plugin/kafka_producer_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,8 @@ def assign_partitions!

@pending_message_queue.each do |message|
partition = message.partition

partition_count = @cluster.partitions_for(message.topic).count
begin
partition_count = @cluster.partitions_for(message.topic).count

if partition.nil?
partition = @partitioner.call(partition_count, message)
Expand Down
1 change: 1 addition & 0 deletions lib/fluent/plugin/out_kafka2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ def write(chunk)
rescue Kafka::UnknownTopicOrPartition
if @use_default_for_unknown_topic && topic != @default_topic
log.warn "'#{topic}' topic not found. Retry with '#{default_topic}' topic"
producer.clear_buffer
topic = @default_topic
retry
end
Expand Down

0 comments on commit 42c6c22

Please sign in to comment.