fluent-plugin-rabbitmq 0.1.1 → 0.1.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-rabbitmq.gemspec +1 -1
- data/lib/fluent/plugin/in_rabbitmq.rb +18 -14
- data/lib/fluent/plugin/out_rabbitmq.rb +1 -2
- 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
|
|
@@ -105,7 +105,6 @@ module Fluent::Plugin
|
|
105
105
|
bunny_options[:tls_key] = @tls_key if @tls_key
|
106
106
|
bunny_options[:tls_ca_certificates] = @tls_ca_certificates if @tls_ca_certificates
|
107
107
|
bunny_options[:verify_peer] = @verify_peer
|
108
|
-
bunny_options[:logger] = log
|
109
108
|
|
110
109
|
@parser = parser_create
|
111
110
|
|
@@ -143,21 +142,26 @@ module Fluent::Plugin
|
|
143
142
|
queue.bind(@exchange, routing_key: @routing_key)
|
144
143
|
end
|
145
144
|
queue.subscribe(manual_ack: @manual_ack) do |delivery_info, properties, payload|
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
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)
|
154
159
|
end
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
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
|
159
164
|
end
|
160
|
-
channel.ack(delivery_info.delivery_tag) if @manual_ack
|
161
165
|
end
|
162
166
|
end
|
163
167
|
|
@@ -95,7 +95,6 @@ module Fluent::Plugin
|
|
95
95
|
bunny_options[:tls_key] = @tls_key if @tls_key
|
96
96
|
bunny_options[:tls_ca_certificates] = @tls_ca_certificates if @tls_ca_certificates
|
97
97
|
bunny_options[:verify_peer] = @verify_peer
|
98
|
-
bunny_options[:logger] = log
|
99
98
|
|
100
99
|
@bunny = Bunny.new(bunny_options)
|
101
100
|
|
@@ -140,7 +139,7 @@ module Fluent::Plugin
|
|
140
139
|
@publish_options[:timestamp] = time.to_i if @timestamp
|
141
140
|
|
142
141
|
if @exchange_type != "fanout"
|
143
|
-
@publish_options[:routing_key] = @routing_key
|
142
|
+
@publish_options[:routing_key] = @routing_key || tag
|
144
143
|
end
|
145
144
|
|
146
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)
|