fluent-plugin-kafka 0.11.0 → 0.11.1

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: 51192d8576ab4ca9653af26130f08f51b61b2004ebeb64759139f08cd90844c9
4
- data.tar.gz: 731fea3399de38b4f0b6133704db5abbfe7d904a22ac1d71bb03875770a02e7d
3
+ metadata.gz: fa8bd187d82171d2d909caee040959b99380852c82c94e7ffb12d9c9b4ab824e
4
+ data.tar.gz: ef617b72fd2908a3119fd086c330f01da867c16314d85dc78151d7489e557332
5
5
  SHA512:
6
- metadata.gz: b00872ab8b675af0d00df8d11e14709036d1694ad98613fdbe5ff6ce9de1dd69c47cfe00af3ebc66fcf9a9093566c492145e100436fa032c60dea14192b952c6
7
- data.tar.gz: 41a4cda769893e18dcfaa213d96f0c270bd7e059a1a003dda7fb9a5b2ac2cdbc61c49698ee47ad6003d59c652694fb4a4f0a13451e6354b1cb024a695e7f8828
6
+ metadata.gz: fda25bea7239416714baae9ba577aad680617f1482f48aae8243b570d5e3fd090cab86fa6da0efb7ea8b4542745e4ad13cb131bcaacf9a5e0c653df044ced319
7
+ data.tar.gz: 53a84fed9f9bb11fdf7b4306af0e1900c216afc4546dc012c532db459d69f95047205c1e020884410cd30ebef915ed8e424f0734b97afc59169a2fe3aa459f5a
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Release 0.11.1 - 2019/08/22
2
+
3
+ * out_kafka2: Fix mutating issue of headers
4
+
1
5
  Release 0.11.0 - 2019/07/17
2
6
 
3
7
  * out_kafka2: Add connect_timeout / socket_timeout parameters
@@ -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.11.0'
16
+ gem.version = '0.11.1'
17
17
  gem.required_ruby_version = ">= 2.1.0"
18
18
 
19
19
  gem.add_dependency "fluentd", [">= 0.10.58", "< 2"]
@@ -220,7 +220,8 @@ DESC
220
220
  messages = 0
221
221
  record_buf = nil
222
222
 
223
- headers = @headers.clone
223
+ base_headers = @headers
224
+ mutate_headers = !@headers_from_record_accessors.empty?
224
225
 
225
226
  begin
226
227
  producer = @kafka.topic_producer(topic, @producer_opts)
@@ -232,8 +233,13 @@ DESC
232
233
  partition = (@exclude_partition ? record.delete(@partition_key) : record[@partition_key]) || @default_partition
233
234
  message_key = (@exclude_message_key ? record.delete(@message_key_key) : record[@message_key_key]) || @default_message_key
234
235
 
235
- @headers_from_record_accessors.each do |key, header_accessor|
236
- headers[key] = header_accessor.call(record)
236
+ if mutate_headers
237
+ headers = base_headers.clone
238
+ @headers_from_record_accessors.each do |key, header_accessor|
239
+ headers[key] = header_accessor.call(record)
240
+ end
241
+ else
242
+ headers = base_headers
237
243
  end
238
244
 
239
245
  record_buf = @formatter_proc.call(tag, time, record)
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.11.0
4
+ version: 0.11.1
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: 2019-07-17 00:00:00.000000000 Z
12
+ date: 2019-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd