fluent-plugin-mqtt-io 0.3.10 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/fluent-plugin-mqtt-io.gemspec +2 -2
- data/lib/fluent/plugin/mqtt_proxy.rb +0 -2
- data/lib/fluent/plugin/out_mqtt.rb +1 -11
- data/test/plugin/test_out_mqtt.rb +0 -4
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fc0cec014b6bf816dd2d0b1772b88a1a070eacd
|
4
|
+
data.tar.gz: ea134724065a4c5bb99f7e3ee8fdaab0ca7a05b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e33d620814d9c7f5284163f8f22985fc583c2be740cc1f2dad6693540f72396b51c46fe7675232ce7a89418e47bdfaafb3ff0c5e39d6c8ab8394af1c52a19bda
|
7
|
+
data.tar.gz: e7c78a5f2b9b8da3c9a46345b0ae1ae40244e6911f1c89b9b0f1278f09eb833290be60c013d49f03b03820560b96da552b1fceebd57ffbe80f8b39710dc7f3a3
|
data/README.md
CHANGED
@@ -123,8 +123,7 @@ For fluent-plugin-mqtt-io ~> v0.3.0
|
|
123
123
|
```
|
124
124
|
|
125
125
|
The options are basically the same as Input Plugin except for "format" and "bulk_trans" (only for Input). Additional options for Output Plugin are the following.
|
126
|
-
|
127
|
-
- **retain**: If set true the broker will keep the message even after sending it to all current subscribers. Default is false
|
126
|
+
|
128
127
|
- **time_key**: An attribute name used for timestamp field genarated from fluentd time field. Default is nil (omitted).
|
129
128
|
If this option is omitted, timestamp field is not appended to the output record.
|
130
129
|
- **time_format**: Output format of timestamp field. Default is ISO8601. You can specify your own format by using TimeParser.
|
@@ -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.
|
7
|
+
spec.version = "0.4.0"
|
8
8
|
spec.authors = ["Toyokazu Akiyama"]
|
9
9
|
spec.email = ["toyokazu@gmail.com"]
|
10
10
|
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.required_ruby_version = '>= 2.2.0'
|
23
23
|
|
24
|
-
spec.add_dependency 'fluentd',
|
24
|
+
spec.add_dependency 'fluentd', [">= 0.14.0", "< 2"]
|
25
25
|
spec.add_dependency "mqtt", "~> 0.5"
|
26
26
|
|
27
27
|
spec.add_development_dependency "bundler", "~> 1.14"
|
@@ -110,8 +110,6 @@ module Fluent::Plugin
|
|
110
110
|
retry_connect(e, "System call error occurs.")
|
111
111
|
rescue StandardError=> e
|
112
112
|
retry_connect(e, "The other error occurs.")
|
113
|
-
rescue MQTT::NotConnectedException=> e
|
114
|
-
retry_connect(e, "MQTT not connected exception occurs.")
|
115
113
|
end
|
116
114
|
end
|
117
115
|
|
@@ -18,11 +18,6 @@ module Fluent::Plugin
|
|
18
18
|
desc 'Topic rewrite replacement string.'
|
19
19
|
config_param :topic_rewrite_replacement, :string, default: nil
|
20
20
|
|
21
|
-
desc 'Retain option which publishing'
|
22
|
-
config_param :retain, :bool, default: false
|
23
|
-
desc 'QoS option which publishing'
|
24
|
-
config_param :qos, :integer, default: 1
|
25
|
-
|
26
21
|
config_section :format do
|
27
22
|
desc 'The format to publish'
|
28
23
|
config_param :@type, :string, default: 'single_value'
|
@@ -144,12 +139,7 @@ module Fluent::Plugin
|
|
144
139
|
chunk.each do |tag, time, record|
|
145
140
|
rescue_disconnection do
|
146
141
|
log.debug "MqttOutput#write: #{rewrite_tag(rewrite_tag(tag))}, #{time}, #{add_send_time(record)}"
|
147
|
-
@client.publish(
|
148
|
-
rewrite_tag(tag),
|
149
|
-
@formatter.format(tag, time, add_send_time(record)),
|
150
|
-
@retain,
|
151
|
-
@qos
|
152
|
-
)
|
142
|
+
@client.publish(rewrite_tag(tag), @formatter.format(tag, time, add_send_time(record)))
|
153
143
|
end
|
154
144
|
end
|
155
145
|
end
|
@@ -21,8 +21,6 @@ class MqttOutputTest < Test::Unit::TestCase
|
|
21
21
|
host 127.0.0.1
|
22
22
|
port 1300
|
23
23
|
client_id aa-bb-cc-dd
|
24
|
-
retain true
|
25
|
-
qos 2
|
26
24
|
<format>
|
27
25
|
@type json
|
28
26
|
</format>
|
@@ -41,8 +39,6 @@ class MqttOutputTest < Test::Unit::TestCase
|
|
41
39
|
assert_equal '127.0.0.1', d.instance.host
|
42
40
|
assert_equal 1300, d.instance.port
|
43
41
|
assert_equal true, d.instance.monitor.send_time
|
44
|
-
assert_equal true, d.instance.retain
|
45
|
-
assert_equal 2, d.instance.qos
|
46
42
|
assert_equal 'aa-bb-cc-dd', d.instance.client_id
|
47
43
|
|
48
44
|
assert_equal true, d.instance.security.use_tls
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-mqtt-io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toyokazu Akiyama
|
8
8
|
autorequire:
|
9
9
|
bindir: []
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.14.0
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '2'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.14.0
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '2'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: mqtt
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|