fluent-plugin-amq 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/fluent-plugin-amq.gemspec +1 -1
- data/lib/fluent/plugin/in_amq.rb +11 -5
- 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: d287b0bcc0aeab13403c142ef5e3fb4ad0c3300c
|
|
4
|
+
data.tar.gz: 52fbc8b519143325d9c223d8e93c54c29f526d7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5495027ac972837f28ef64aa820049f92d4eddc44ad7ec07ee40672ca9bd9c4d705e1a3e8e9820fc8e8be7e2692129b039517c31b7119adf51f3d276f66f39c7
|
|
7
|
+
data.tar.gz: 956d15f3b28e85f2136fc4ea49853bce71c4be1e70ad1197d84c976c1dfbf43eb2fd5c51a0f73391613ab1fce6e5dd47312da0bac11bcb81072ec2f3b5a606d6
|
data/fluent-plugin-amq.gemspec
CHANGED
|
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "fluent-plugin-amq"
|
|
6
|
-
s.version = "0.0.
|
|
6
|
+
s.version = "0.0.3"
|
|
7
7
|
s.authors = ["Anton Sherkhonov"]
|
|
8
8
|
s.email = ["sherkhonov@gmail.com"]
|
|
9
9
|
s.homepage = "https://github.com/t0ffel/fluent-plugin-amq"
|
data/lib/fluent/plugin/in_amq.rb
CHANGED
|
@@ -88,11 +88,17 @@ module Fluent
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
def build_record(message)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
begin
|
|
92
|
+
record = {
|
|
93
|
+
body: JSON.parse(message.body),
|
|
94
|
+
address: message.address,
|
|
95
|
+
msg_id: message.id
|
|
96
|
+
}
|
|
97
|
+
rescue => e
|
|
98
|
+
@log.error "Error decoding JSON from #{e.message}"
|
|
99
|
+
@log.error "Backtrace: #{e.backtrace}"
|
|
100
|
+
end
|
|
101
|
+
|
|
96
102
|
record[:properties] = message.properties if (message.properties and message.properties.size > 0)
|
|
97
103
|
record[:annotations] = message.annotations if (message.annotations and message.annotations.size > 0)
|
|
98
104
|
record[:instructions] = message.instructions if (message.instructions and message.instructions.size > 0)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-amq
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anton Sherkhonov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-04-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|