jruby-kafka 3.3-java → 3.4-java

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: 4d17ccab91e382e75bded41bc235dfcf54384034
4
- data.tar.gz: 0942e26a59f26f83b4e329cf832efd862aa450b2
3
+ metadata.gz: 1e2ecdaa822edd2ccb270f43d2c70cb9b4446bd4
4
+ data.tar.gz: 6f21ccc8ed81336ddc0221fec8a393ffd00acf11
5
5
  SHA512:
6
- metadata.gz: f6865c7fb4f91557852f6464e4b5f6739727082e7b07ca387667b0d925e173c59e8dc2a1a6b8bcad4546c9e234080754a7f6916722a000eea7c8aa8a4800c904
7
- data.tar.gz: ecb86c2213e38e6623f7fdc93605820ca19b7810a82a205c6033d6e093ff62fe3202ee902e5221724655f3e6699736e7692de2d7e40fa03eba4acb49180f148f
6
+ metadata.gz: ed86326cd196b0f3371284422cd7abcc7c996a23841c6680e71be71b504d29d7cc94bf1f064464ae02da1a92e1c7279111a154be8a2fdb34d1359b07a6ce3440
7
+ data.tar.gz: 1f40d89646837b695b8fc5a0bd23d5a21e00cb36a40ef9835547e2bcd24093cedd4a56e06f52af38a21213b2236736c23e4462362931a1e6428faad495b451fb
@@ -3,13 +3,12 @@ require 'jruby-kafka/namespace'
3
3
  require 'concurrent'
4
4
  require 'jruby-kafka/utility'
5
5
 
6
- class Kafka::KafkaConsumer
6
+ class Kafka::KafkaConsumer < Java::org.apache.kafka.clients.consumer.KafkaConsumer
7
7
 
8
8
  REQUIRED = [
9
9
  :bootstrap_servers, :key_deserializer, :value_deserializer
10
10
  ]
11
11
 
12
- KAFKA_CONSUMER = Java::org.apache.kafka.clients.consumer.KafkaConsumer
13
12
  # Create a Kafka high-level consumer.
14
13
  #
15
14
  # @param [Hash] config the consumer configuration.
@@ -27,39 +26,19 @@ class Kafka::KafkaConsumer
27
26
  def initialize(config={})
28
27
  Kafka::Utility.validate_arguments REQUIRED, config
29
28
  @properties = config.clone
30
- @topics = @properties.delete :topics
31
29
  @stop_called = Concurrent::AtomicBoolean.new(false)
32
- @consumer = KAFKA_CONSUMER.new(Kafka::Utility.java_properties @properties)
33
- @subscribed = false
34
- subscribe
30
+ super Kafka::Utility.java_properties @properties
35
31
  end
36
32
 
37
- attr_reader :properties, :topics
33
+ attr_reader :properties
38
34
 
39
35
  def stop
40
36
  @stop_called.make_true
41
- @consumer.wakeup
42
- end
43
-
44
- # Subscribe to topics
45
- def subscribe
46
- @consumer.subscribe(@topics)
47
- @subscribed = true
48
- nil
37
+ self.wakeup
49
38
  end
50
39
 
51
40
  # stop? should never be overriden
52
41
  def stop?
53
42
  @stop_called.value
54
43
  end
55
-
56
- # Fetch data for the topics or partitions specified using one of the subscribe/assign APIs.
57
- def poll(timeout)
58
- @consumer.poll timeout
59
- end
60
-
61
- def close
62
- @consumer.close
63
- end
64
44
  end
65
-
@@ -1,4 +1,4 @@
1
1
  module Kafka
2
- VERSION = '3.3'.freeze
2
+ VERSION = '3.4'.freeze
3
3
  JAR_DEPENDENCIES_VERSION = '0.3.2'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-kafka
3
3
  version: !ruby/object:Gem::Version
4
- version: '3.3'
4
+ version: '3.4'
5
5
  platform: java
6
6
  authors:
7
7
  - Joseph Lawson