fluent-plugin-mqtt-io 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-mqtt-io.gemspec +1 -1
- data/lib/fluent/plugin/in_mqtt.rb +10 -0
- 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: cc6dec8983c390053d834987c88e0270eb667698
|
4
|
+
data.tar.gz: 62e1f5a0fea5a8118828ed0f06ec267434b32b51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caa412b890d75a0c261e3a5422c827bb4d0d81e7214b30829daaf6bbc68cbd2cbd511d64d963b0cb3ba4b772c7c32c107bfc22d092c6b754a2f80a4514f4062d
|
7
|
+
data.tar.gz: 342e79e3cb772b44857e1012c710d8b27ecec17a920f1dda6af37f49a9aed8163b472c9ccda28131de6d59cc691e471c93de344f3faa9dccd43038d00409a9f1
|
@@ -32,6 +32,7 @@ module Fluent
|
|
32
32
|
@username ||= conf['username']
|
33
33
|
@password ||= conf['password']
|
34
34
|
configure_parser(conf)
|
35
|
+
@reconn_interval = 2
|
35
36
|
end
|
36
37
|
|
37
38
|
def configure_parser(conf)
|
@@ -68,6 +69,7 @@ module Fluent
|
|
68
69
|
emit(topic, message)
|
69
70
|
end
|
70
71
|
end
|
72
|
+
@reconn_interval = 2
|
71
73
|
sleep
|
72
74
|
rescue MQTT::ProtocolException => pe
|
73
75
|
$log.debug "Handling #{pe.class}: #{pe.message}"
|
@@ -75,6 +77,14 @@ module Fluent
|
|
75
77
|
rescue Timeout::Error => te
|
76
78
|
$log.debug "Handling #{te.class}: #{te.message}"
|
77
79
|
next
|
80
|
+
rescue Errno::ECONNREFUSED => ce
|
81
|
+
$log.debug "Server seems to be down... Retry in #{@reconn_interval} sec #{ce.class}: #{ce.message}"
|
82
|
+
sleep @reconn_interval
|
83
|
+
@reconn_interval = @reconn_interval * 2
|
84
|
+
next
|
85
|
+
rescue => oe
|
86
|
+
$log.debug "Other Exception #{oe.class}: #{oe.message}"
|
87
|
+
exit 1
|
78
88
|
end
|
79
89
|
end
|
80
90
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-mqtt-io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toyokazu Akiyama
|
8
8
|
autorequire:
|
9
9
|
bindir: []
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|