lib/fluent/plugin/out_kafka2.rb in roched-fluent-plugin-kafka-0.6.7 vs lib/fluent/plugin/out_kafka2.rb in roched-fluent-plugin-kafka-0.6.8
- old
+ new
@@ -69,13 +69,15 @@
def refresh_client(raise_error = true)
begin
logger = @get_kafka_client_log ? log : nil
if @scram_mechanism && @username && @password
+ log.info "using scram authentication"
@kafka = Kafka.new(seed_brokers: @seed_brokers, client_id: @client_id, ssl_ca_cert: read_ssl_file(@ssl_ca_cert),
ssl_client_cert: read_ssl_file(@ssl_client_cert), ssl_client_cert_key: read_ssl_file(@ssl_client_cert_key),
sasl_scram_username: @username, sasl_scram_password: @password, sasl_scram_mechanism: @scram_mechanism)
elseif @username && @password
+ log.info "using plain authentication"
@kafka = Kafka.new(seed_brokers: @seed_brokers, client_id: @client_id, ssl_ca_cert: read_ssl_file(@ssl_ca_cert),
ssl_client_cert: read_ssl_file(@ssl_client_cert), ssl_client_cert_key: read_ssl_file(@ssl_client_cert_key),
sasl_plain_username: @username, sasl_plain_password: @password)
else
@kafka = Kafka.new(seed_brokers: @seed_brokers, client_id: @client_id, ssl_ca_cert: read_ssl_file(@ssl_ca_cert),