franz 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/franz/output/kafka.rb +7 -6
- 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: fd20ae601a812f14da2e9d9146e9d74970659581
|
4
|
+
data.tar.gz: 69e9d35c516f2cf92a318f8bc33ffc63f7639429
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73af588b20cba91ff0c5cacd024976b003cec1a9ed0e3950652e0684ab8041393351b88d09d25199b996a844ffd8760f99da19f8ed418332d2d105443ba4a763
|
7
|
+
data.tar.gz: a9b99b414f778002471fc9ef24c133f57a06091304ba2c644decb6c1707d86ec323b7c7bd8730e523ac26aabe9724f997bbbfac438605f3d9427bfd176a3d871
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.1
|
data/lib/franz/output/kafka.rb
CHANGED
@@ -28,7 +28,6 @@ module Franz
|
|
28
28
|
flush_interval: 10,
|
29
29
|
flush_size: 500,
|
30
30
|
client_id: @@host,
|
31
|
-
cluster: %w[ localhost:9092 ],
|
32
31
|
type: 'sync',
|
33
32
|
compression_codec: 'snappy',
|
34
33
|
metadata_refresh_interval_ms: 600000,
|
@@ -51,12 +50,14 @@ module Franz
|
|
51
50
|
@flush_size = opts[:output].delete :flush_size
|
52
51
|
@flush_interval = opts[:output].delete :flush_interval
|
53
52
|
|
54
|
-
|
53
|
+
kafka_brokers = opts[:output].delete(:brokers) || %w[ localhost:9092 ]
|
55
54
|
kafka_client_id = opts[:output].delete :client_id
|
56
|
-
kafka_config = opts[:output].map { |k,v|
|
55
|
+
kafka_config = opts[:output].map { |k,v|
|
56
|
+
[ k, v.is_a?(String) ? v.to_sym : v ]
|
57
|
+
}
|
57
58
|
|
58
59
|
@kafka = Poseidon::Producer.new \
|
59
|
-
|
60
|
+
kafka_brokers,
|
60
61
|
kafka_client_id,
|
61
62
|
Hash[kafka_config]
|
62
63
|
|
@@ -93,8 +94,8 @@ module Franz
|
|
93
94
|
|
94
95
|
@statz.inc :num_output
|
95
96
|
|
96
|
-
if @
|
97
|
-
@kafka.send_messages @messages
|
97
|
+
if @messages.size >= @flush_size
|
98
|
+
@kafka.send_messages @messages
|
98
99
|
log.debug \
|
99
100
|
event: 'flush',
|
100
101
|
num_messages: @messages.size
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: franz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Clemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slog
|