fluent-plugin-kafka 0.7.5 → 0.7.6

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
  SHA1:
3
- metadata.gz: 062d9f00a23e3da41cb5560a9d8ed28513ad34e3
4
- data.tar.gz: 8108e5809e4c3a1022328c3eece0cee2f3cdf70e
3
+ metadata.gz: 1f69043ece5ca612bdca6988b3fea137e958832b
4
+ data.tar.gz: 1b784d0fca451efd86fa532f868033f5605b21e7
5
5
  SHA512:
6
- metadata.gz: d63623c99bfc9bdc0ac325ff2ade206b5500ddbf5ac2921b16ec3ac99d07f3dd36a4207950a0911922d0f3e2fc8da1a1bf6029b68f62caf690f15c0dca633baa
7
- data.tar.gz: 653e1d40e43f601670a47f930240d4247cbc93bf3e055058107c65187fada4716f1a8069eee2f5b94095f7541c3d565f62a61ebffbfcfc55a2d75740ae548ef7
6
+ metadata.gz: c081880f8953d5e97c7ff31f90a84ead32ea538103d215f8d3cb65287a87f39e3acf03be0a5f2af15ce4ff9a2816c114bf5b2d715afde7e90ebd6663cc237c0c
7
+ data.tar.gz: e1d65842eaadb2edc711be10612cc8a5d69f648e0934e49c5544360aaca798842cbac021cd21080fcdc4700c943773a571aedc2083f23df8d32fed3959f7c95a
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Release 0.7.6 - 2018/08/15
2
+
3
+ * out_kafka2: Add ignore_exceptions and exception_backup parameters
4
+
1
5
  Release 0.7.5 - 2018/08/14
2
6
 
3
7
  * out_kafka2: Fix `message_key_key` parameter handling
@@ -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.7.5'
16
+ gem.version = '0.7.6'
17
17
  gem.required_ruby_version = ">= 2.1.0"
18
18
 
19
19
  gem.add_dependency "fluentd", [">= 0.10.58", "< 2"]
@@ -36,6 +36,9 @@ DESC
36
36
 
37
37
  config_param :get_kafka_client_log, :bool, :default => false
38
38
 
39
+ config_param :ignore_exceptions, :array, :default => [], value_type: :string, :desc => "Ignorable exception list"
40
+ config_param :exception_backup, :bool, :default => true, :desc => "Chunk backup flag when ignore exception occured"
41
+
39
42
  # ruby-kafka producer options
40
43
  config_param :max_send_retries, :integer, :default => 2,
41
44
  :desc => "Number of times to retry sending of messages to a leader."
@@ -218,12 +221,17 @@ DESC
218
221
  end
219
222
  end
220
223
  rescue Exception => e
224
+ ignore = @ignore_exceptions.include?(e.class.name)
225
+
221
226
  log.warn "Send exception occurred: #{e}"
222
227
  log.warn "Exception Backtrace : #{e.backtrace.join("\n")}"
228
+ log.warn "Exception ignored in tag : #{tag}" if ignore
223
229
  # For safety, refresh client and its producers
224
230
  refresh_client(false)
231
+ # raise UnrecoverableError for backup ignored exception chunk
232
+ raise Fluent::UnrecoverableError if ignore && exception_backup
225
233
  # Raise exception to retry sendind messages
226
- raise e
234
+ raise e unless ignore
227
235
  ensure
228
236
  producer.shutdown if producer
229
237
  end
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.7.5
4
+ version: 0.7.6
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: 2018-08-15 00:00:00.000000000 Z
12
+ date: 2018-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd