fluent-plugin-kafka 0.19.5 → 0.19.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17961fc6c8b1aa236a49f6e464ad5cab9e10731ee208923f0a8e5b656d2c4c65
4
- data.tar.gz: c36db6868dbb56daef12196359c6e258e03783f831cc00048598d1e3fcb29a63
3
+ metadata.gz: c01dcccf05f4c04f7dc5eb08c7f2da880ea7f892242931e95a009fe8cb18c270
4
+ data.tar.gz: d446556bb8e8c65b7a2b16460aac3fab05720f444a5551bb7da486e5941e8c98
5
5
  SHA512:
6
- metadata.gz: cd7e1a087448d229fd1d6647035ecbecb01fd298bf26b86783be88d14dfe681e1dbedca880eddd201bb7c1bbbbe1a9a2c6cdc82d5d2797c68926d5c938f0428c
7
- data.tar.gz: e9bdab87031ec6c55f91c15e8e1f45f384bc21b54dffb26046aa6f255f6151ad7433ae887f6ba5c8e7f612162a898909e413eae972e3411368afbf4b87202e58
6
+ metadata.gz: efe8546b9cdd28016b8872cdcbf91402b3cfd11b50ef1a63e38215b46128399bd05ed0d211cf03e8cbee1122b5316f15f95c3bc906937d2244340e4a9b68cdd8
7
+ data.tar.gz: 100e538e93d736579a5886db60e3dc769807efc0ac516f352def62b126f7d636e594161ea72c490fffcf3c8a4f0bd22ada8fc59be40873aa407f9aa034e20e75
@@ -19,7 +19,14 @@ jobs:
19
19
  - { min: '>= 0.6.0', max: '< 0.12.0' }
20
20
  - { min: '>= 0.12.0', max: '< 0.14.0' }
21
21
  - { min: '>= 0.14.0', max: '< 0.16.0' }
22
- - { min: '>= 0.16.0', max: '>= 0.16.0' }
22
+ - { min: '>= 0.16.0', max: '< 0.25.0' }
23
+ - { min: '>= 0.25.0', max: '>= 0.25.0' }
24
+ # rdkafka 0.25.0 supports Ruby 3.2+, so we exclude it for Ruby 3.0 and 3.1
25
+ exclude:
26
+ - ruby: '3.1'
27
+ rdkafka_versions: { min: '>= 0.25.0', max: '>= 0.25.0' }
28
+ - ruby: '3.0'
29
+ rdkafka_versions: { min: '>= 0.25.0', max: '>= 0.25.0' }
23
30
  # rdkafka 0.15.2 is the last version which supports Ruby 2.7
24
31
  include:
25
32
  - ruby: '2.7'
@@ -30,7 +37,7 @@ jobs:
30
37
  rdkafka_versions: { min: '>= 0.12.0', max: '= 0.15.2' }
31
38
  name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }} with rdkafka gem version (min ${{ matrix.rdkafka_versions.min }} max ${{ matrix.rdkafka_versions.max }})
32
39
  steps:
33
- - uses: actions/checkout@v4
40
+ - uses: actions/checkout@v6
34
41
  - uses: ruby/setup-ruby@v1
35
42
  with:
36
43
  ruby-version: ${{ matrix.ruby }}
@@ -7,7 +7,7 @@ jobs:
7
7
  stale:
8
8
  runs-on: ubuntu-latest
9
9
  steps:
10
- - uses: actions/stale@v9
10
+ - uses: actions/stale@v10
11
11
  with:
12
12
  repo-token: ${{ secrets.GITHUB_TOKEN }}
13
13
  days-before-stale: 90
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ Release 0.19.6 - 2026/03/04
2
+ * out_rdkafka2: Auto-configure SASL PLAIN when username and password are set (#547)
3
+ * out_rdkafka2: Fix NoMethodError during graceful reload (#546)
4
+ * out_rdkafka: Fix ArgumentError for ssl_client_cert_key_password (#545)
5
+ * out_rdkafka, out_rdkafka2: Fix deprecation warning for max_wait_timeout in rdkafka-ruby >= 0.25.0 (#544)
6
+
1
7
  Release 0.19.5 - 2025/07/11
2
8
  * in_kafka_group: Add `sasl_aws_msk_iam_access_key_id`, `sasl_aws_msk_iam_secret_access_key`
3
9
  and `sasl_aws_msk_iam_aws_region` options (#531)
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
14
  gem.name = "fluent-plugin-kafka"
15
15
  gem.require_paths = ["lib"]
16
- gem.version = '0.19.5'
16
+ gem.version = '0.19.6'
17
17
  gem.required_ruby_version = ">= 2.1.0"
18
18
 
19
19
  gem.add_dependency "fluentd", [">= 0.10.58", "< 2"]
@@ -78,7 +78,6 @@ DESC
78
78
  config_param :enqueue_retry_backoff, :integer, :default => 3
79
79
 
80
80
  config_param :service_name, :string, :default => nil
81
- config_param :ssl_client_cert_key_password, :string, :default => nil
82
81
 
83
82
  include Fluent::KafkaPluginUtil::SSLSettings
84
83
  include Fluent::KafkaPluginUtil::SaslSettings
@@ -87,6 +86,8 @@ DESC
87
86
  super
88
87
  @producers = {}
89
88
  @producers_mutex = Mutex.new
89
+
90
+ @use_max_wait_timeout_ms = Gem::Version.new(Rdkafka::VERSION) >= Gem::Version.new('0.25.0')
90
91
  end
91
92
 
92
93
  def configure(conf)
@@ -291,7 +292,13 @@ DESC
291
292
  handler = enqueue_with_retry(producer, topic, record_buf, message_key, partition, time)
292
293
  handler
293
294
  }.each { |handler|
294
- handler.wait(max_wait_timeout: @rdkafka_delivery_handle_poll_timeout) if @rdkafka_delivery_handle_poll_timeout != 0
295
+ if @rdkafka_delivery_handle_poll_timeout != 0
296
+ if @use_max_wait_timeout_ms
297
+ handler.wait(max_wait_timeout_ms: @rdkafka_delivery_handle_poll_timeout * 1000)
298
+ else
299
+ handler.wait(max_wait_timeout: @rdkafka_delivery_handle_poll_timeout)
300
+ end
301
+ end
295
302
  }
296
303
  end
297
304
  rescue Exception => e
@@ -168,12 +168,14 @@ DESC
168
168
  def initialize
169
169
  super
170
170
 
171
- @producers = nil
172
- @producers_mutex = nil
171
+ @producers = {}
172
+ @producers_mutex = Mutex.new
173
173
  @shared_producer = nil
174
174
  @enqueue_rate = nil
175
175
  @writing_threads_mutex = Mutex.new
176
176
  @writing_threads = Set.new
177
+
178
+ @use_max_wait_timeout_ms = Gem::Version.new(Rdkafka::VERSION) >= Gem::Version.new('0.25.0')
177
179
  end
178
180
 
179
181
  def configure(conf)
@@ -266,6 +268,11 @@ DESC
266
268
  config[:"sasl.kerberos.keytab"] = @keytab if @keytab
267
269
  end
268
270
 
271
+ if @username && @password
272
+ sasl = true
273
+ config[:"sasl.mechanisms"] = 'PLAIN'
274
+ end
275
+
269
276
  if ssl && sasl
270
277
  security_protocol = "SASL_SSL"
271
278
  elsif ssl && !sasl
@@ -301,7 +308,6 @@ DESC
301
308
  @shared_producer = @rdkafka.producer
302
309
  else
303
310
  @producers = {}
304
- @producers_mutex = Mutex.new
305
311
  end
306
312
 
307
313
  super
@@ -430,7 +436,11 @@ DESC
430
436
  end
431
437
  }
432
438
  handlers.each { |handler|
433
- handler.wait(max_wait_timeout: @rdkafka_delivery_handle_poll_timeout)
439
+ if @use_max_wait_timeout_ms
440
+ handler.wait(max_wait_timeout_ms: @rdkafka_delivery_handle_poll_timeout * 1000)
441
+ else
442
+ handler.wait(max_wait_timeout: @rdkafka_delivery_handle_poll_timeout)
443
+ end
434
444
  }
435
445
  end
436
446
  rescue Exception => e
@@ -39,6 +39,7 @@ class KafkaGroupInputTest < Test::Unit::TestCase
39
39
  class ConsumeTest < self
40
40
  def setup
41
41
  @kafka = Kafka.new(["localhost:9092"], client_id: 'kafka')
42
+ @kafka.create_topic(TOPIC_NAME)
42
43
  @producer = @kafka.producer
43
44
  end
44
45
 
@@ -59,6 +60,7 @@ class KafkaGroupInputTest < Test::Unit::TestCase
59
60
  d = create_driver
60
61
 
61
62
  d.run(expect_records: 1, timeout: 10) do
63
+ sleep 0.1
62
64
  @producer.produce("Hello, fluent-plugin-kafka!", topic: TOPIC_NAME)
63
65
  @producer.deliver_messages
64
66
  end
@@ -55,6 +55,18 @@ class Rdkafka2OutputTest < Test::Unit::TestCase
55
55
  assert_equal 'localhost:9092', d.instance.brokers
56
56
  end
57
57
 
58
+ def test_configure_sasl_plain
59
+ conf = base_config + config_element('ROOT', '', {"username" => "testuser", "password" => "testpass"}, [])
60
+ d = create_driver(conf)
61
+
62
+ config = d.instance.build_config
63
+
64
+ assert_equal 'PLAIN', config[:"sasl.mechanisms"]
65
+ assert_equal 'SASL_PLAINTEXT', config[:"security.protocol"]
66
+ assert_equal 'testuser', config[:"sasl.username"]
67
+ assert_equal 'testpass', config[:"sasl.password"]
68
+ end
69
+
58
70
  def test_mutli_worker_support
59
71
  d = create_driver
60
72
  assert_equal true, d.instance.multi_workers_ready?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-kafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.5
4
+ version: 0.19.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hidemasa Togashi
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0'
217
217
  requirements: []
218
- rubygems_version: 3.6.7
218
+ rubygems_version: 4.0.6
219
219
  specification_version: 4
220
220
  summary: Fluentd plugin for Apache Kafka > 0.8
221
221
  test_files: