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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac5b853f32cd0a93b55e91812bdad1b113bd82388beb431119da0d377b8996bc
4
- data.tar.gz: 2332f9a8474caa93c17d27d7d07a4c9451691357164f86ed011624747c817b75
3
+ metadata.gz: 70d1f5b2d602e09a3d304968d2de7a0011cdce7da8572efb4f3ae53ea876f823
4
+ data.tar.gz: 07d5c5425e4ebe4e5289d5f53349e5e6eaa5b638aeaa50188de610a8aca06908
5
5
  SHA512:
6
- metadata.gz: 7844293f4266134e4ecf186f37e3c889e5e99f6ec6944d5819a24cfce479c6a6b25a933cafbedf41406c54b40d4888895d3805e078d2163a7b74f4a826e25b69
7
- data.tar.gz: '076086578fba89026c4fc431f35e45b840ddb18b9e38510d53db1ababb4468f4cd70eadb9ab968247967406e6bc31719dfc1cc9d9f708c56b81c14b07e2f9954'
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.2"
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
- @parser.parse(payload) do |time, record|
146
- time = if properties[:timestamp]
147
- Fluent::EventTime.from_time(properties[:timestamp])
148
- else
149
- time
150
- end
151
- if @include_headers
152
- record[@headers_key] = properties.headers
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
- if @include_delivery_info
155
- record[@delivery_info_key] = delivery_info
156
- end
157
- router.emit(@tag, time, record)
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 ? @routing_key : tag
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.2
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: 2023-11-28 00:00:00.000000000 Z
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.4.22
147
+ rubygems_version: 3.5.11
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: fluent plugin for rabbitmq (AMQP)