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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d296aa7e9f2bf32ab247b8f99ad7bdaf972cf763
4
- data.tar.gz: 669477119ff620c36cb45bf2ed63ae2ed238b1d2
3
+ metadata.gz: cc6dec8983c390053d834987c88e0270eb667698
4
+ data.tar.gz: 62e1f5a0fea5a8118828ed0f06ec267434b32b51
5
5
  SHA512:
6
- metadata.gz: a105c66f6dd6e4e11a6e7f118c34295590da1c10ec0bd31e6393aafc21cceef2274dc3f2468c1d6a5c6105a4a44e6c53eb79e48d27fde883e866bbebd6e89d7e
7
- data.tar.gz: 04fd6db671975fb44c8ba536fc10e31c43503d1d20eb0d76bda5a41bfc6a5657dedea25f9489d44495f22f76b5ec4b2158ca9b563c583c9f5b05391691f56fb7
6
+ metadata.gz: caa412b890d75a0c261e3a5422c827bb4d0d81e7214b30829daaf6bbc68cbd2cbd511d64d963b0cb3ba4b772c7c32c107bfc22d092c6b754a2f80a4514f4062d
7
+ data.tar.gz: 342e79e3cb772b44857e1012c710d8b27ecec17a920f1dda6af37f49a9aed8163b472c9ccda28131de6d59cc691e471c93de344f3faa9dccd43038d00409a9f1
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-mqtt-io"
7
- spec.version = "0.1.0"
7
+ spec.version = "0.1.1"
8
8
  spec.authors = ["Toyokazu Akiyama"]
9
9
  spec.email = ["toyokazu@gmail.com"]
10
10
 
@@ -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.0
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: 2015-12-28 00:00:00.000000000 Z
11
+ date: 2016-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd