lib/fluent/plugin/out_kafka2.rb in fluent-plugin-kafka-0.6.0 vs lib/fluent/plugin/out_kafka2.rb in fluent-plugin-kafka-0.6.1

- old
+ new

@@ -99,9 +99,19 @@ unless formatter_conf["@type"] raise Fluent::ConfigError, "format/@type is required." end @formatter_proc = setup_formatter(formatter_conf) + if @default_topic.nil? + if @chunk_keys.include?('topic') && !@chunk_keys.include?('tag') + log.warn "Use 'topic' field of event record for topic but no fallback. Recommend to set default_topic or set 'tag' in buffer chunk keys like <buffer topic,tag>" + end + else + if @chunk_keys.include?('tag') + log.warn "default_topic is set. Fluentd's event tag is not used for topic" + end + end + @producer_opts = {max_retries: @max_send_retries, required_acks: @required_acks} @producer_opts[:ack_timeout] = @ack_timeout if @ack_timeout @producer_opts[:compression_codec] = @compression_codec.to_sym if @compression_codec if @active_support_notification_regex require 'active_support/notifications'