fluent-plugin-kafka 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/fluent-plugin-kafka.gemspec +1 -1
- data/lib/fluent/plugin/in_kafka_group.rb +18 -2
- 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: 2b9941b6f4988f1fb14b5a0a591a81574411f915
|
4
|
+
data.tar.gz: '08c543d8db1c038e908584460e39a6a9df89e86c'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 253f7354704fecc1fa1d21bc84056727169fc9dcbcbde55afe595ae9c882213dae910c82bd2b7e34918169f9275f6a8ab031646405409a115912a92f93092b94
|
7
|
+
data.tar.gz: 87cdd5a750bc91c036901d64f76fda7ae874a7fcc16f9f573311bfc5a061492e6d5a3612c6c3378bf7ab34f7a99b8f6b029d75405a2ef240cf3bb40c709498f0
|
data/ChangeLog
CHANGED
data/fluent-plugin-kafka.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
13
13
|
gem.name = "fluent-plugin-kafka"
|
14
14
|
gem.require_paths = ["lib"]
|
15
|
-
gem.version = '0.6.
|
15
|
+
gem.version = '0.6.3'
|
16
16
|
gem.required_ruby_version = ">= 2.1.0"
|
17
17
|
|
18
18
|
gem.add_dependency "fluentd", [">= 0.10.58", "< 2"]
|
@@ -26,6 +26,7 @@ class Fluent::KafkaGroupInput < Fluent::Input
|
|
26
26
|
config_param :time_format, :string, :default => nil,
|
27
27
|
:desc => "Time format to be used to parse 'time' filed."
|
28
28
|
|
29
|
+
config_param :retry_wait_seconds, :integer, :default => 30
|
29
30
|
# Kafka consumer options
|
30
31
|
config_param :max_bytes, :integer, :default => 1048576,
|
31
32
|
:desc => "Maximum number of bytes to fetch."
|
@@ -122,7 +123,7 @@ class Fluent::KafkaGroupInput < Fluent::Input
|
|
122
123
|
|
123
124
|
def start
|
124
125
|
super
|
125
|
-
|
126
|
+
|
126
127
|
@kafka = Kafka.new(seed_brokers: @brokers,
|
127
128
|
ssl_ca_cert: read_ssl_file(@ssl_ca_cert),
|
128
129
|
ssl_client_cert: read_ssl_file(@ssl_client_cert),
|
@@ -152,7 +153,21 @@ class Fluent::KafkaGroupInput < Fluent::Input
|
|
152
153
|
}
|
153
154
|
consumer
|
154
155
|
end
|
155
|
-
|
156
|
+
|
157
|
+
def reconnect_consumer
|
158
|
+
log.warn "Stopping Consumer"
|
159
|
+
consumer = @consumer
|
160
|
+
@consumer = nil
|
161
|
+
consumer.stop
|
162
|
+
log.warn "Could not connect to broker. Next retry will be in #{@retry_wait_seconds} seconds"
|
163
|
+
sleep @retry_wait_seconds
|
164
|
+
@consumer = setup_consumer
|
165
|
+
log.warn "Re-starting consumer #{Time.now.to_s}"
|
166
|
+
rescue =>e
|
167
|
+
log.error "unexpected error during re-starting consumer object access", :error => e.to_s
|
168
|
+
log.error_backtrace
|
169
|
+
end
|
170
|
+
|
156
171
|
def run
|
157
172
|
while @consumer
|
158
173
|
begin
|
@@ -189,6 +204,7 @@ class Fluent::KafkaGroupInput < Fluent::Input
|
|
189
204
|
rescue => e
|
190
205
|
log.error "unexpected error during consuming events from kafka. Re-fetch events.", :error => e.to_s
|
191
206
|
log.error_backtrace
|
207
|
+
reconnect_consumer
|
192
208
|
end
|
193
209
|
end
|
194
210
|
rescue => e
|
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.6.
|
4
|
+
version: 0.6.3
|
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: 2017-11-
|
12
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|