fluent-plugin-kafka 0.19.1 → 0.19.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 342b66e96b3175aed8f7fe9bc0f29bb03f2737924229eaa63d7ffd408f5209cf
4
- data.tar.gz: 89a9361a2c599eca1419668136ecb722c6eaa95e9ebc55f2e2a2be3f1346cafc
3
+ metadata.gz: 62d114017cabc47f58cd39db1ea21dd8cfb6d76126c4804741e25766a5b4576c
4
+ data.tar.gz: f5e4ea9adb96a8f2f46077c0ac89b51e1c177ea0933242ed6cbb6472e40577a2
5
5
  SHA512:
6
- metadata.gz: '0172977463edc0ff6085588bcded5bf3d33412e088422bf48954672507d7661bda68735d1415fcc9dcaebd132eff355cc714be619c15a107962e12dc69eba4e1'
7
- data.tar.gz: 00054cf6be46a6041fd6f8712f3159f832f91deffcf34feef45fff919d2301b2e04b5ec0493a2d9086af87c3ce9ec37ca0f004a9fac006ee4e3c17d20b372984
6
+ metadata.gz: 80f4d2ce4d23d95837d3b344841339fc517581bc3347e17e5352a135b088756317b970b559eb66f05e0216ce8841c9e374c5ed0fd09e48d22346249ec9aec0b9
7
+ data.tar.gz: 8d89ff55bf6ac92e5d2c7a3942882a6b307e6fe19ede620bf299d54feb6f2f1d70fcdece731008324a993c96c69f44456a71798c9af879666de9d017b38e39c3
@@ -20,7 +20,7 @@ jobs:
20
20
  - { min: '>= 0.12.0', max: '>= 0.12.0' }
21
21
  name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }} with rdkafka gem version (min ${{ matrix.rdkafka_versions.min }} max ${{ matrix.rdkafka_versions.max }})
22
22
  steps:
23
- - uses: actions/checkout@v3
23
+ - uses: actions/checkout@v4
24
24
  - uses: ruby/setup-ruby@v1
25
25
  with:
26
26
  ruby-version: ${{ matrix.ruby }}
data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ Release 0.19.2 - 2023/10/13
2
+ * out_rdkafka2: Add `discard_kafka_delivery_failed_regex`
3
+
1
4
  Release 0.19.1 - 2023/09/20
2
5
  * out_rdkafka2: Add `use_default_for_unknown_topic` & `use_default_for_unknown_partition_error`
3
6
 
data/README.md CHANGED
@@ -517,6 +517,7 @@ You need to install rdkafka gem.
517
517
  exclude_topic_key (bool) :default => false
518
518
  exclude_partition_key (bool) :default => false
519
519
  discard_kafka_delivery_failed (bool) :default => false (No discard)
520
+ discard_kafka_delivery_failed_regex (regexp) :default => nil (No discard)
520
521
  use_event_time (bool) :default => false
521
522
 
522
523
  # same with kafka2
@@ -559,6 +560,9 @@ You need to install rdkafka gem.
559
560
  max_enqueue_bytes_per_second (integer) :default => nil
560
561
  </match>
561
562
 
563
+ `rdkafka2` supports `discard_kafka_delivery_failed_regex` parameter:
564
+ - `discard_kafka_delivery_failed_regex` - default: nil - discard the record where the Kafka::DeliveryFailed occurred and the emitted message matches the given regex pattern, such as `/unknown_topic/`.
565
+
562
566
  If you use v0.12, use `rdkafka` instead.
563
567
 
564
568
  <match kafka.**>
@@ -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.1'
16
+ gem.version = '0.19.2'
17
17
  gem.required_ruby_version = ">= 2.1.0"
18
18
 
19
19
  gem.add_dependency "fluentd", [">= 0.10.58", "< 2"]
@@ -112,6 +112,7 @@ DESC
112
112
  config_param :use_event_time, :bool, :default => false, :desc => 'Use fluentd event time for rdkafka timestamp'
113
113
  config_param :max_send_limit_bytes, :size, :default => nil
114
114
  config_param :discard_kafka_delivery_failed, :bool, :default => false
115
+ config_param :discard_kafka_delivery_failed_regex, :regexp, :default => nil
115
116
  config_param :rdkafka_buffering_max_ms, :integer, :default => nil, :desc => 'Used for queue.buffering.max.ms'
116
117
  config_param :rdkafka_buffering_max_messages, :integer, :default => nil, :desc => 'Used for queue.buffering.max.messages'
117
118
  config_param :rdkafka_message_max_bytes, :integer, :default => nil, :desc => 'Used for message.max.bytes'
@@ -461,9 +462,13 @@ DESC
461
462
  if @discard_kafka_delivery_failed
462
463
  log.warn "Delivery failed. Discard events:", :error => e.to_s, :error_class => e.class.to_s, :tag => tag
463
464
  else
464
- log.warn "Send exception occurred: #{e} at #{e.backtrace.first}"
465
- # Raise exception to retry sendind messages
466
- raise e
465
+ if @discard_kafka_delivery_failed_regex != nil && @discard_kafka_delivery_failed_regex.match?(e.to_s)
466
+ log.warn "Delivery failed and matched regexp pattern #{@discard_kafka_delivery_failed_regex}. Discard events:", :error => e.to_s, :error_class => e.class.to_s, :tag => tag
467
+ else
468
+ log.warn "Send exception occurred: #{e} at #{e.backtrace.first}"
469
+ # Raise exception to retry sendind messages
470
+ raise e
471
+ end
467
472
  end
468
473
  ensure
469
474
  @writing_threads_mutex.synchronize { @writing_threads.delete(Thread.current) }
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.1
4
+ version: 0.19.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hidemasa Togashi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-09-20 00:00:00.000000000 Z
12
+ date: 2023-10-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd