fluent-plugin-rabbitmq 0.1.1 → 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: 0fa22768ed1823cd072d1e226c9f6ea44cd3b0b2396e90066edcc76ae552124f
4
- data.tar.gz: bf85c005c06eef232a104e561ef5cd6e90c35618099f957c4c401adbf226d899
3
+ metadata.gz: 70d1f5b2d602e09a3d304968d2de7a0011cdce7da8572efb4f3ae53ea876f823
4
+ data.tar.gz: 07d5c5425e4ebe4e5289d5f53349e5e6eaa5b638aeaa50188de610a8aca06908
5
5
  SHA512:
6
- metadata.gz: 9cae2d54e168c4f6158f8d0c32e114a1b136d5e596ed8ec64afc2cef1767c8ea6a7e6958a57b15a0f84b5a464ad7378fb7c1cc2fdbf191a45942ab59d110f37c
7
- data.tar.gz: b2668f14ef34eaffaefed06b3a80394a7f2a404a3d0c94c002dd91a5c42e1fd2ef5597002e2e06504b5a0cf4633042a777bf4395195d73c6b18cac30502e90e5
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.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
- @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
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
- if @include_delivery_info
156
- record[@delivery_info_key] = delivery_info
157
- end
158
- 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
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 ? @routing_key : tag
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.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: 2023-11-13 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)