fluent-plugin-mqtt-io 0.2.2 → 0.2.3

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: 5d00a8d71f16ee4a7f7c25d5c6432e1786159728
4
- data.tar.gz: 54654b5f2cf2dca79f443a3e376a1bd323b4514f
3
+ metadata.gz: c1403811416a6ec5ae4b65f1e2f910425c78464f
4
+ data.tar.gz: 36025a84dafc6aacc2295c76cd0a9f8110563514
5
5
  SHA512:
6
- metadata.gz: d061d3b17e90904f305b1310992e78aa4ebd26659fa9c10218e741b43b4d464157757d4c52c41a423b784dfb3409c23315e3bd0cc90f3cbb16f3d45af63b268b
7
- data.tar.gz: 52628b2004bd6e0c492c12ce3fe4e24d073d4d02c9e21a7499ea0579c67313ee27108d71f6cd388156800f40d356d3bf57a386b71b3201afa6a020fef669083d
6
+ metadata.gz: 64ae726ba5f10ba20d16692626cd9ce1d6424fe1a0aacd735fbacd73f3bf3c927c07838980907e9bb5ef89b3227eb7c03b64b82979de5df3825e168a5a58d5c8
7
+ data.tar.gz: 9501641e21422a5fa755550a1e9a32427515e03ef9cfd3721095bbcdb2d6d806e03e36d71b35a1a8d334696a6d7f5e42127145e4bbad970bb89562f4c83ce2a6
data/README.md CHANGED
@@ -5,7 +5,7 @@ Mqtt::IO Plugin is deeply inspired by Fluent::Plugin::Mqtt.
5
5
 
6
6
  https://github.com/yuuna/fluent-plugin-mqtt
7
7
 
8
- Mqtt::IO plugin focus on federating components, e.g. sensors, messaging platform and databases.
8
+ Mqtt::IO plugin focus on federating components, e.g. sensors, messaging platform and databases. Encryption/Decription is not supported in this plugin but [fluent-plugin-jwt-filter](https://github.com/toyokazu/fluent-plugin-jwt-filter) can be used to encrypt/decrypt messages using JSON Web Token technology.
9
9
 
10
10
  ## Installation
11
11
 
@@ -43,23 +43,25 @@ Input Plugin can be used via source directive in the configuration.
43
43
 
44
44
  The default MQTT topic is "#". Configurable options are the following:
45
45
 
46
- - host: IP address of MQTT broker
47
- - port: Port number of MQTT broker
48
- - format (mandatory): Input parser can be chosen, e.g. json, xml
46
+ - **host**: IP address of MQTT broker
47
+ - **port**: Port number of MQTT broker
48
+ - **format** (mandatory): Input parser can be chosen, e.g. json, xml
49
49
  - In order to use xml format, you need to install [fluent-plugin-xml-parser](https://github.com/toyokazu/fluent-plugin-xml-parser).
50
50
  - Default time_key field for json format is 'time'
51
- - topic: Topic name to be subscribed
52
- - bulk_trans: Enable bulk transfer to support buffered output (mqtt_buf, Fluent::MqttBufferedOutput, defaut: true)
53
- - bulk_trans_sep: A message separator for bulk transfer. The default separator is "\t".
54
- - username: User name for authentication
55
- - password: Password for authentication
56
- - keep_alive: An interval of sending keep alive packet (default 15 sec)
57
- - ssl: set true if you want to use SSL/TLS. If set to true, the following parameter must be provided
58
- - ca_file: CA certificate file path
59
- - key_file: private key file path
60
- - cert_file: certificate file path
61
- - recv_time: Add receive time to message in millisecond (ms) as integer for debug and performance/delay analysis
62
- - recv_time_key: An attribute of recv_time
51
+ - **topic**: Topic name to be subscribed
52
+ - **bulk_trans**: Enable bulk transfer to support buffered output (mqtt_buf, Fluent::MqttBufferedOutput, defaut: true)
53
+ - **bulk_trans_sep**: A message separator for bulk transfer. The default separator is "\t".
54
+ - **username**: User name for authentication
55
+ - **password**: Password for authentication
56
+ - **keep_alive**: An interval of sending keep alive packet (default 15 sec)
57
+ - **ssl**: set true if you want to use SSL/TLS. If set to true, the following parameter must be provided
58
+ - **ca_file**: CA certificate file path
59
+ - **key_file**: private key file path
60
+ - **cert_file**: certificate file path
61
+ - **recv_time**: Add receive time to message in millisecond (ms) as integer for debug and performance/delay analysis
62
+ - **recv_time_key**: An attribute of recv_time
63
+ - **initial_interval**: An initial value of retry interval (s) (default 1)
64
+ - **retry_inc_ratio**: An increase ratio of retry interval per connection failure (default 2 (double)). It may be better to set the value to 1 in a mobile environment for eager reconnection.
63
65
 
64
66
  Input Plugin supports @label directive.
65
67
 
@@ -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.2.2"
7
+ spec.version = "0.2.3"
8
8
  spec.authors = ["Toyokazu Akiyama"]
9
9
  spec.email = ["toyokazu@gmail.com"]
10
10
 
@@ -17,6 +17,8 @@ module Fluent
17
17
  config_param :cert_file, :string, :default => nil
18
18
  config_param :recv_time, :bool, :default => false
19
19
  config_param :recv_time_key, :string, :default => "recv_time"
20
+ config_param :initial_interval, :integer, :default => 1
21
+ config_param :retry_inc_ratio, :integer, :default => 2
20
22
 
21
23
  require 'mqtt'
22
24
 
@@ -37,11 +39,11 @@ module Fluent
37
39
  end
38
40
 
39
41
  def init_retry_interval
40
- @retry_interval = 1
42
+ @retry_interval = @initial_interval
41
43
  end
42
44
 
43
45
  def increment_retry_interval
44
- @retry_interval = @retry_interval * 2
46
+ @retry_interval = @retry_interval * @retry_inc_ratio
45
47
  end
46
48
 
47
49
  def sleep_retry_interval(e, message)
@@ -20,6 +20,8 @@ module Fluent
20
20
  base.config_param :bulk_trans_sep, :string, :default => "\t"
21
21
  base.config_param :send_time, :bool, :default => false
22
22
  base.config_param :send_time_key, :string, :default => "send_time"
23
+ base.config_param :initial_interval, :integer, :default => 1
24
+ base.config_param :retry_inc_ratio, :integer, :default => 2
23
25
  end
24
26
 
25
27
  require 'mqtt'
@@ -33,11 +35,11 @@ module Fluent
33
35
  end
34
36
 
35
37
  def init_retry_interval
36
- @retry_interval = 1
38
+ @retry_interval = @initial_interval
37
39
  end
38
40
 
39
41
  def increment_retry_interval
40
- @retry_interval = @retry_interval * 2
42
+ @retry_interval = @retry_interval * @retry_inc_ratio
41
43
  end
42
44
 
43
45
  def sleep_retry_interval(e, message)
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.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toyokazu Akiyama
8
8
  autorequire:
9
9
  bindir: []
10
10
  cert_chain: []
11
- date: 2016-01-29 00:00:00.000000000 Z
11
+ date: 2016-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -105,10 +105,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.4.5
108
+ rubygems_version: 2.4.5.1
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: fluentd input/output plugin for mqtt broker
112
112
  test_files:
113
113
  - test/helper.rb
114
- has_rdoc: