fluent-plugin-rabbitmq 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-rabbitmq.gemspec +1 -1
- data/lib/fluent/plugin/in_rabbitmq.rb +18 -13
- data/lib/fluent/plugin/out_rabbitmq.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70d1f5b2d602e09a3d304968d2de7a0011cdce7da8572efb4f3ae53ea876f823
|
4
|
+
data.tar.gz: 07d5c5425e4ebe4e5289d5f53349e5e6eaa5b638aeaa50188de610a8aca06908
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f43d4ed05bcae822f9c86f544b8f586ac710ceba55ac7de9ba871580dd96bb89053f1f41c2fdf9d23ddcd8516a2fd2659e43cf1ae9c8039dd5c020db41625e2
|
7
|
+
data.tar.gz: ee11e9b5a5ba11d268d25be3d196affe47a7eacd6d3980918cccc1eb8e678e00c9f9f63517b4d8f6c8448baf08e9ba7be22005da30bd81605494a19ebaeae12f
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "fluent-plugin-rabbitmq"
|
6
|
-
spec.version = "0.1.
|
6
|
+
spec.version = "0.1.3"
|
7
7
|
spec.authors = ["NTT Communications"]
|
8
8
|
spec.email = ["masaki.matsushita@ntt.com"]
|
9
9
|
|
@@ -142,21 +142,26 @@ module Fluent::Plugin
|
|
142
142
|
queue.bind(@exchange, routing_key: @routing_key)
|
143
143
|
end
|
144
144
|
queue.subscribe(manual_ack: @manual_ack) do |delivery_info, properties, payload|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
145
|
+
begin
|
146
|
+
@parser.parse(payload) do |time, record|
|
147
|
+
time = if properties[:timestamp]
|
148
|
+
Fluent::EventTime.from_time(properties[:timestamp])
|
149
|
+
else
|
150
|
+
time
|
151
|
+
end
|
152
|
+
if @include_headers
|
153
|
+
record[@headers_key] = properties.headers
|
154
|
+
end
|
155
|
+
if @include_delivery_info
|
156
|
+
record[@delivery_info_key] = delivery_info
|
157
|
+
end
|
158
|
+
router.emit(@tag, time, record)
|
153
159
|
end
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
160
|
+
rescue Fluent::Plugin::Parser::ParserError => e
|
161
|
+
log.error "Parser error: #{e.message}", error: e, payload: payload, tag: @tag
|
162
|
+
ensure
|
163
|
+
channel.ack(delivery_info.delivery_tag) if @manual_ack
|
158
164
|
end
|
159
|
-
channel.ack(delivery_info.delivery_tag) if @manual_ack
|
160
165
|
end
|
161
166
|
end
|
162
167
|
|
@@ -139,7 +139,7 @@ module Fluent::Plugin
|
|
139
139
|
@publish_options[:timestamp] = time.to_i if @timestamp
|
140
140
|
|
141
141
|
if @exchange_type != "fanout"
|
142
|
-
@publish_options[:routing_key] = @routing_key
|
142
|
+
@publish_options[:routing_key] = @routing_key || tag
|
143
143
|
end
|
144
144
|
|
145
145
|
if @id_key
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-rabbitmq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NTT Communications
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
|
-
rubygems_version: 3.
|
147
|
+
rubygems_version: 3.5.11
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: fluent plugin for rabbitmq (AMQP)
|