logstash-integration-kafka 11.2.0-java → 11.3.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/docs/index.asciidoc +1 -1
  4. data/docs/input-kafka.asciidoc +2 -2
  5. data/docs/output-kafka.asciidoc +2 -2
  6. data/lib/logstash/inputs/kafka.rb +7 -1
  7. data/lib/logstash-integration-kafka_jars.rb +7 -12
  8. data/logstash-integration-kafka.gemspec +1 -1
  9. data/spec/unit/inputs/kafka_spec.rb +13 -0
  10. data/vendor/jar-dependencies/com/github/luben/zstd-jni/1.5.5-4/zstd-jni-1.5.5-4.jar +0 -0
  11. data/vendor/jar-dependencies/io/confluent/kafka-avro-serializer/7.4.0/kafka-avro-serializer-7.4.0.jar +0 -0
  12. data/vendor/jar-dependencies/io/confluent/kafka-schema-registry-client/7.4.0/kafka-schema-registry-client-7.4.0.jar +0 -0
  13. data/vendor/jar-dependencies/io/confluent/kafka-schema-serializer/7.4.0/kafka-schema-serializer-7.4.0.jar +0 -0
  14. data/vendor/jar-dependencies/org/apache/avro/avro/{1.11.0/avro-1.11.0.jar → 1.11.1/avro-1.11.1.jar} +0 -0
  15. data/vendor/jar-dependencies/org/apache/kafka/kafka-clients/{3.3.1/kafka-clients-3.3.1.jar → 3.4.1/kafka-clients-3.4.1.jar} +0 -0
  16. data/vendor/jar-dependencies/org/xerial/snappy/snappy-java/1.1.10.1/snappy-java-1.1.10.1.jar +0 -0
  17. metadata +10 -15
  18. data/vendor/jar-dependencies/com/github/luben/zstd-jni/1.5.2-2/zstd-jni-1.5.2-2.jar +0 -0
  19. data/vendor/jar-dependencies/io/confluent/common-config/7.3.0/common-config-7.3.0.jar +0 -0
  20. data/vendor/jar-dependencies/io/confluent/common-utils/7.3.0/common-utils-7.3.0.jar +0 -0
  21. data/vendor/jar-dependencies/io/confluent/kafka-avro-serializer/7.3.0/kafka-avro-serializer-7.3.0.jar +0 -0
  22. data/vendor/jar-dependencies/io/confluent/kafka-schema-registry-client/7.3.0/kafka-schema-registry-client-7.3.0.jar +0 -0
  23. data/vendor/jar-dependencies/io/confluent/kafka-schema-serializer/7.3.0/kafka-schema-serializer-7.3.0.jar +0 -0
  24. data/vendor/jar-dependencies/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.jar +0 -0
  25. data/vendor/jar-dependencies/org/apache/kafka/kafka_2.12/3.3.1/kafka_2.12-3.3.1.jar +0 -0
  26. data/vendor/jar-dependencies/org/glassfish/jersey/core/jersey-common/2.33/jersey-common-2.33.jar +0 -0
  27. data/vendor/jar-dependencies/org/xerial/snappy/snappy-java/1.1.8.4/snappy-java-1.1.8.4.jar +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f4d4eeff4c13ac6151467cb7998742151a2829a18b05d6a74377edd7acab7fc
4
- data.tar.gz: 22fc71adaf29c11b9f0090436dc2e330a1a21eefc8fceb3aa4b4063f2adad626
3
+ metadata.gz: 2a71a06cb2805f4a474eb2f3cb25cf15e4612e4d29e785c1ba6c8b7d86e392ae
4
+ data.tar.gz: 43eee87ac19ec950267d14b712e48d01d1961819172a350c8f384dfaced9b103
5
5
  SHA512:
6
- metadata.gz: 4ae9306a90795f0d877e896ee79e2c7ecd46b1c7033bca2d3182a5b0b4dbc66b50502d23c39a70451b5a7b83013763232e8e7a8a5dba8958d237831e2808ce6a
7
- data.tar.gz: 5e4e48213df61f86cabf5e3535fc4f2c424714b904e12b0076812c832793b243ebbf54376edd90f9490e67f0a8268f290296be9570fa71704b626acd51ee92de
6
+ metadata.gz: 88b9f88f55b566d98468556c94bba80eb955441c04c4cb154bf769dd30c2a156f6509b55c2c35f4ca352c1c838084832472bf97d8a8a9a198aac7a5778be3888
7
+ data.tar.gz: 35c5d8829cf5108afab37ddcff500afb0e35029200c298ffa1e28d7dd21166761a6df0ff1acb6b423a8176cc0b312bab7df186b7f5539e7aa1dbe4ccaf1409b9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 11.3.0
2
+ - Bump kafka client to 3.4.1 [#145](https://github.com/logstash-plugins/logstash-integration-kafka/pull/145)
3
+
4
+ ## 11.2.1
5
+ - Fix nil exception to empty headers of record during event metadata assignment [#140](https://github.com/logstash-plugins/logstash-integration-kafka/pull/140)
6
+
1
7
  ## 11.2.0
2
8
  - Added TLS truststore and keystore settings specifically to access the schema registry [#137](https://github.com/logstash-plugins/logstash-integration-kafka/pull/137)
3
9
 
data/docs/index.asciidoc CHANGED
@@ -1,7 +1,7 @@
1
1
  :plugin: kafka
2
2
  :type: integration
3
3
  :no_codec:
4
- :kafka_client: 3.3.1
4
+ :kafka_client: 3.4.1
5
5
 
6
6
  ///////////////////////////////////////////
7
7
  START - GENERATED VARIABLES, DO NOT EDIT!
@@ -2,8 +2,8 @@
2
2
  :plugin: kafka
3
3
  :type: input
4
4
  :default_codec: plain
5
- :kafka_client: 3.3
6
- :kafka_client_doc: 33
5
+ :kafka_client: 3.4
6
+ :kafka_client_doc: 34
7
7
 
8
8
  ///////////////////////////////////////////
9
9
  START - GENERATED VARIABLES, DO NOT EDIT!
@@ -2,8 +2,8 @@
2
2
  :plugin: kafka
3
3
  :type: output
4
4
  :default_codec: plain
5
- :kafka_client: 3.3
6
- :kafka_client_doc: 33
5
+ :kafka_client: 3.4
6
+ :kafka_client_doc: 34
7
7
 
8
8
  ///////////////////////////////////////////
9
9
  START - GENERATED VARIABLES, DO NOT EDIT!
@@ -373,7 +373,9 @@ class LogStash::Inputs::Kafka < LogStash::Inputs::Base
373
373
  event.set("[@metadata][kafka][timestamp]", record.timestamp)
374
374
  end
375
375
  if @metadata_mode.include?(:headers)
376
- record.headers.each do |header|
376
+ record.headers
377
+ .select{|h| header_with_value(h) }
378
+ .each do |header|
377
379
  s = String.from_java_bytes(header.value)
378
380
  s.force_encoding(Encoding::UTF_8)
379
381
  if s.valid_encoding?
@@ -499,4 +501,8 @@ class LogStash::Inputs::Kafka < LogStash::Inputs::Base
499
501
  end
500
502
  end
501
503
 
504
+ def header_with_value(header)
505
+ !header.nil? && !header.value.nil? && !header.key.nil?
506
+ end
507
+
502
508
  end #class LogStash::Inputs::Kafka
@@ -1,17 +1,12 @@
1
1
  # AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.
2
2
 
3
3
  require 'jar_dependencies'
4
- require_jar('io.confluent', 'kafka-avro-serializer', '7.3.0')
5
- require_jar('io.confluent', 'kafka-schema-serializer', '7.3.0')
6
- require_jar('io.confluent', 'common-config', '7.3.0')
7
- require_jar('org.apache.avro', 'avro', '1.11.0')
8
- require_jar('io.confluent', 'kafka-schema-registry-client', '7.3.0')
9
- require_jar('org.apache.kafka', 'kafka_2.12', '3.3.1')
10
- require_jar('io.confluent', 'common-utils', '7.3.0')
11
- require_jar('javax.ws.rs', 'javax.ws.rs-api', '2.1.1')
12
- require_jar('org.glassfish.jersey.core', 'jersey-common', '2.33')
13
- require_jar('org.apache.kafka', 'kafka-clients', '3.3.1')
14
- require_jar('com.github.luben', 'zstd-jni', '1.5.2-2')
4
+ require_jar('io.confluent', 'kafka-avro-serializer', '7.4.0')
5
+ require_jar('io.confluent', 'kafka-schema-serializer', '7.4.0')
6
+ require_jar('org.apache.avro', 'avro', '1.11.1')
7
+ require_jar('io.confluent', 'kafka-schema-registry-client', '7.4.0')
8
+ require_jar('org.apache.kafka', 'kafka-clients', '3.4.1')
15
9
  require_jar('org.slf4j', 'slf4j-api', '1.7.36')
10
+ require_jar('com.github.luben', 'zstd-jni', '1.5.5-4')
16
11
  require_jar('org.lz4', 'lz4-java', '1.8.0')
17
- require_jar('org.xerial.snappy', 'snappy-java', '1.1.8.4')
12
+ require_jar('org.xerial.snappy', 'snappy-java', '1.1.10.1')
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-integration-kafka'
3
- s.version = '11.2.0'
3
+ s.version = '11.3.0'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "Integration with Kafka - input and output plugins"
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline "+
@@ -287,6 +287,19 @@ describe LogStash::Inputs::Kafka do
287
287
  subject.register
288
288
  expect(subject.metadata_mode).to include(:record_props)
289
289
  end
290
+
291
+ context "guards against nil header" do
292
+ let(:header) { double(:value => nil, :key => "k") }
293
+ let(:headers) { [ header ] }
294
+ let(:record) { double(:headers => headers, :topic => "topic", :partition => 0,
295
+ :offset => 123456789, :key => "someId", :timestamp => nil ) }
296
+
297
+ it "does not raise error when key is nil" do
298
+ subject.register
299
+ evt = LogStash::Event.new('message' => 'Hello')
300
+ expect { subject.maybe_set_metadata(evt, record) }.not_to raise_error
301
+ end
302
+ end
290
303
  end
291
304
 
292
305
  context 'with client_rack' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-integration-kafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.2.0
4
+ version: 11.3.0
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-14 00:00:00.000000000 Z
11
+ date: 2023-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -257,20 +257,15 @@ files:
257
257
  - spec/unit/inputs/avro_schema_fixture_payment.asvc
258
258
  - spec/unit/inputs/kafka_spec.rb
259
259
  - spec/unit/outputs/kafka_spec.rb
260
- - vendor/jar-dependencies/com/github/luben/zstd-jni/1.5.2-2/zstd-jni-1.5.2-2.jar
261
- - vendor/jar-dependencies/io/confluent/common-config/7.3.0/common-config-7.3.0.jar
262
- - vendor/jar-dependencies/io/confluent/common-utils/7.3.0/common-utils-7.3.0.jar
263
- - vendor/jar-dependencies/io/confluent/kafka-avro-serializer/7.3.0/kafka-avro-serializer-7.3.0.jar
264
- - vendor/jar-dependencies/io/confluent/kafka-schema-registry-client/7.3.0/kafka-schema-registry-client-7.3.0.jar
265
- - vendor/jar-dependencies/io/confluent/kafka-schema-serializer/7.3.0/kafka-schema-serializer-7.3.0.jar
266
- - vendor/jar-dependencies/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.jar
267
- - vendor/jar-dependencies/org/apache/avro/avro/1.11.0/avro-1.11.0.jar
268
- - vendor/jar-dependencies/org/apache/kafka/kafka-clients/3.3.1/kafka-clients-3.3.1.jar
269
- - vendor/jar-dependencies/org/apache/kafka/kafka_2.12/3.3.1/kafka_2.12-3.3.1.jar
270
- - vendor/jar-dependencies/org/glassfish/jersey/core/jersey-common/2.33/jersey-common-2.33.jar
260
+ - vendor/jar-dependencies/com/github/luben/zstd-jni/1.5.5-4/zstd-jni-1.5.5-4.jar
261
+ - vendor/jar-dependencies/io/confluent/kafka-avro-serializer/7.4.0/kafka-avro-serializer-7.4.0.jar
262
+ - vendor/jar-dependencies/io/confluent/kafka-schema-registry-client/7.4.0/kafka-schema-registry-client-7.4.0.jar
263
+ - vendor/jar-dependencies/io/confluent/kafka-schema-serializer/7.4.0/kafka-schema-serializer-7.4.0.jar
264
+ - vendor/jar-dependencies/org/apache/avro/avro/1.11.1/avro-1.11.1.jar
265
+ - vendor/jar-dependencies/org/apache/kafka/kafka-clients/3.4.1/kafka-clients-3.4.1.jar
271
266
  - vendor/jar-dependencies/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar
272
267
  - vendor/jar-dependencies/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar
273
- - vendor/jar-dependencies/org/xerial/snappy/snappy-java/1.1.8.4/snappy-java-1.1.8.4.jar
268
+ - vendor/jar-dependencies/org/xerial/snappy/snappy-java/1.1.10.1/snappy-java-1.1.10.1.jar
274
269
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
275
270
  licenses:
276
271
  - Apache-2.0
@@ -294,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
289
  - !ruby/object:Gem::Version
295
290
  version: '0'
296
291
  requirements: []
297
- rubygems_version: 3.1.6
292
+ rubygems_version: 3.2.33
298
293
  signing_key:
299
294
  specification_version: 4
300
295
  summary: Integration with Kafka - input and output plugins