hermann 0.20.3-java → 0.21.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hermann/provider/java_simple_consumer.rb +10 -8
- data/lib/hermann/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6a1a6f690380d42108163531fff423dbfec503a
|
4
|
+
data.tar.gz: 21feec77b221baecb14a51d705bcbffd929f7bce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 948fe20e4ee8a7c6f4887a603d5458927e8acb76d85a145688018b2d596b25df4d320f390adaccbc8a17f8c668e3f676331b1269685d06023da8598b3601c437
|
7
|
+
data.tar.gz: c5bffb241c7f4adfbcc0cd5371c06dec45c6c66d789508c93811516d505a77d3278990dc7d62b39cf33a3e8b78d9e0d79d465e996d247680cb6c66b389c9a40a
|
@@ -15,7 +15,7 @@ module Hermann
|
|
15
15
|
DEFAULTS_HERMANN_OPTS = {
|
16
16
|
'zookeeper.session.timeout.ms' => '400',
|
17
17
|
'zookeeper.sync.time.ms' => '200',
|
18
|
-
'auto.commit.interval.ms' => '1000'
|
18
|
+
'auto.commit.interval.ms' => '1000',
|
19
19
|
}.freeze
|
20
20
|
|
21
21
|
DEFAULT_CONSUMER_OPTIONS = {
|
@@ -38,16 +38,18 @@ module Hermann
|
|
38
38
|
# @option opts [Boolean] :do_retry Retry consume attempts if exceptions are thrown, defaults to true
|
39
39
|
# @option opts [Fixnum] :max_retries Number of max_retries to retry #consume when it throws an exception
|
40
40
|
# @option opts [Logger] :logger Pass in a Logger
|
41
|
+
# @option opts [Other] other opts from kafka
|
41
42
|
def initialize(zookeepers, groupId, topic, opts={})
|
42
|
-
config = create_config(zookeepers, groupId)
|
43
|
-
@consumer = ConsumerUtil::Consumer.createJavaConsumerConnector(config)
|
44
43
|
@topic = topic
|
45
|
-
|
46
44
|
options = DEFAULT_CONSUMER_OPTIONS.merge(opts)
|
47
|
-
@backoff_time_sec = options
|
48
|
-
@do_retry = options
|
49
|
-
@max_retries = options
|
50
|
-
@logger = options
|
45
|
+
@backoff_time_sec = options.delete(:backoff_time_sec)
|
46
|
+
@do_retry = options.delete(:do_retry)
|
47
|
+
@max_retries = options.delete(:max_retries)
|
48
|
+
@logger = options.delete(:logger)
|
49
|
+
# deleting options above so that they do not get sent to
|
50
|
+
# the create_config method
|
51
|
+
config = create_config(zookeepers, groupId, options)
|
52
|
+
@consumer = ConsumerUtil::Consumer.createJavaConsumerConnector(config)
|
51
53
|
end
|
52
54
|
|
53
55
|
# Shuts down the various threads created by createMessageStreams
|
data/lib/hermann/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hermann
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- R. Tyler Croy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-04-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|