fluent-plugin-mqtt 0.0.6 → 0.0.7
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.gemspec +1 -1
- data/lib/fluent/plugin/in_mqtt.rb +9 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ebd832e07164e15a36a3617c61c78ac14cc1c10
|
4
|
+
data.tar.gz: 9ac4921e763bc8484beb993182513ff0e16937a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc796bd26c90e7ff7f1dbb93cd59b95083ff3ca8b26c6a97e1404efcee4ad936d976be1c41358708ace9ac2e889b9983725c8e54ad04f7f397f8c6f0de516b3c
|
7
|
+
data.tar.gz: 036f05679c777eab6d332c205b4fc804f17774c9276d63d56d3cedf79843eff4d7d27e7b7143e682a9c005eb568b6774244f0abbbbdfd7e4dfaf900e3b219161
|
data/fluent-plugin-mqtt.gemspec
CHANGED
@@ -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"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.7"
|
8
8
|
spec.authors = ["Yuuna Kurita"]
|
9
9
|
spec.email = ["yuuna.m@gmail.com"]
|
10
10
|
spec.summary = %q{fluentd input plugin for mqtt server}
|
@@ -7,6 +7,12 @@ module Fluent
|
|
7
7
|
|
8
8
|
include Fluent::SetTimeKeyMixin
|
9
9
|
config_set_default :include_time_key, true
|
10
|
+
|
11
|
+
# Define `router` method of v0.12 to support v0.10 or earlier
|
12
|
+
unless method_defined?(:router)
|
13
|
+
define_method("router") { Fluent::Engine }
|
14
|
+
end
|
15
|
+
|
10
16
|
|
11
17
|
config_param :port, :integer, :default => 1883
|
12
18
|
config_param :bind, :string, :default => '127.0.0.1'
|
@@ -67,14 +73,15 @@ module Fluent
|
|
67
73
|
end
|
68
74
|
end
|
69
75
|
|
76
|
+
|
70
77
|
def emit topic, message, time = Fluent::Engine.now
|
71
78
|
if message.class == Array
|
72
79
|
message.each do |data|
|
73
80
|
$log.debug "#{topic}: #{data}"
|
74
|
-
|
81
|
+
router.emit(topic , time , data)
|
75
82
|
end
|
76
83
|
else
|
77
|
-
|
84
|
+
router.emit(topic , time , message)
|
78
85
|
end
|
79
86
|
end
|
80
87
|
|