fluent-plugin-rabbitmq 0.0.9 → 0.1.0

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: bb39b34d1e433753ccc9147fb471c96eca6a99c683529711be46556224fe8efd
4
- data.tar.gz: 0e5339fbc5edf3e1e37d22a7e8cd6b49fcf8a7a28e374e8cfbf7ad9ed4acac13
3
+ metadata.gz: 0f8aa321e95ea389c5a2da190c4c899ab4377c3ea8215f07f89696d43c9b13f5
4
+ data.tar.gz: fa13e44c14381053880790dcd86548bfb00084c3fd2459c89f7abc88be649919
5
5
  SHA512:
6
- metadata.gz: c1c6d8e9987b7d52e72137c2e63af0c63290c0bad884a4aa277ea744bbac54c7b761f25da41349e423f945e08f918be20277f6436303f3c66c91f1bea2207782
7
- data.tar.gz: f935b733e4fe986cf17d190d1eccc002c08507254c2a4cb82f0a50c321411474368e31dfe86947bc83c30d94084926b3e8263aa78a990db5f26553d6fbd64ac7
6
+ metadata.gz: e00b8f18807b574404f2157648a144f1ed8e23e8b6ef15efb4e677aab1f1d28b85ceb78a095408caaff0b33becd57a888af1f8b758f6ba22fb0517e3d7433b9b
7
+ data.tar.gz: cc218b853f71edcb0c543a3927e695917610a488888e0dcb396a7d1e83cc79b179237b9bc064afccab9984fa517a6d374ad163d35fd5cc1d737315dc2a01df96
data/README.md CHANGED
@@ -34,8 +34,6 @@ fluentd >= 0.14.0
34
34
  <parse>
35
35
  @type json # or msgpack, ltsv, none
36
36
  </parse>
37
- <buffer> # to use in buffered mode
38
- </buffer>
39
37
  </source>
40
38
  ```
41
39
 
@@ -56,6 +54,8 @@ fluentd >= 0.14.0
56
54
  |exchange_type|direct|topic|type of created exchange|
57
55
  |exchange_routing_key|hoge|nil|created exchange routing key|
58
56
  |exchange_durable|true|false|durability of create exchange|
57
+ |manual_ack|true|false|manual ACK|
58
+ |queue_mode|"lazy"|nil|queue mode|
59
59
 
60
60
  ### Output
61
61
 
@@ -76,6 +76,8 @@ fluentd >= 0.14.0
76
76
  <format>
77
77
  @type json # or msgpack, ltsv, none
78
78
  </format>
79
+ <buffer> # to use in buffered mode
80
+ </buffer>
79
81
  </match>
80
82
  ```
81
83
 
@@ -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.0.9"
6
+ spec.version = "0.1.0"
7
7
  spec.authors = ["NTT Communications"]
8
8
  spec.email = ["masaki.matsushita@ntt.com"]
9
9
 
@@ -71,6 +71,8 @@ module Fluent::Plugin
71
71
  config_param :include_delivery_info, :bool, default: false
72
72
  config_param :headers_key, :string, default: "headers"
73
73
  config_param :delivery_info_key, :string, default: "delivery_info"
74
+ config_param :manual_ack, :bool, default: false
75
+ config_param :queue_mode, :string, default: nil
74
76
 
75
77
  def initialize
76
78
  super
@@ -124,7 +126,9 @@ module Fluent::Plugin
124
126
  @bunny_exchange.bind(@exchange_to_bind, routing_key: @exchange_routing_key)
125
127
  end
126
128
  end
127
- queue_arguments = {"x-message-ttl" => @ttl} if @ttl
129
+ queue_arguments = {}
130
+ queue_arguments["x-message-ttl"] = @ttl if @ttl
131
+ queue_arguments["x-queue-mode"] = @queue_mode if @queue_mode
128
132
  queue = channel.queue(
129
133
  @queue,
130
134
  durable: @durable,
@@ -135,7 +139,7 @@ module Fluent::Plugin
135
139
  if @exchange
136
140
  queue.bind(@exchange, routing_key: @routing_key)
137
141
  end
138
- queue.subscribe do |delivery_info, properties, payload|
142
+ queue.subscribe(manual_ack: @manual_ack) do |delivery_info, properties, payload|
139
143
  @parser.parse(payload) do |time, record|
140
144
  time = if properties[:timestamp]
141
145
  Fluent::EventTime.from_time(properties[:timestamp])
@@ -150,6 +154,7 @@ module Fluent::Plugin
150
154
  end
151
155
  router.emit(@tag, time, record)
152
156
  end
157
+ channel.ack(delivery_info.delivery_tag) if @manual_ack
153
158
  end
154
159
  end
155
160
 
@@ -61,7 +61,7 @@ module Fluent::Plugin
61
61
  config_param :content_type, :string, default: nil
62
62
  config_param :content_encoding, :string, default: nil
63
63
  config_param :expiration, :integer, default: nil
64
- config_param :message_type, :integer, default: nil
64
+ config_param :message_type, :string, default: nil
65
65
  config_param :priority, :integer, default: nil
66
66
  config_param :app_id, :string, default: nil
67
67
 
@@ -105,7 +105,7 @@ module Fluent::Plugin
105
105
  @publish_options[:persistent] = @persistent if @persistent
106
106
  @publish_options[:mandatory] = @mandatory if @mandatory
107
107
  @publish_options[:expiration] = @expiration if @expiration
108
- @publish_options[:message_type] = @message_type if @message_type
108
+ @publish_options[:type] = @message_type if @message_type
109
109
  @publish_options[:priority] = @priority if @priority
110
110
  @publish_options[:app_id] = @app_id if @app_id
111
111
 
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.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - NTT Communications
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-09 00:00:00.000000000 Z
11
+ date: 2023-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -129,7 +129,7 @@ homepage: https://github.com/nttcom/fluent-plugin-rabbitmq
129
129
  licenses:
130
130
  - Apache-2.0
131
131
  metadata: {}
132
- post_install_message:
132
+ post_install_message:
133
133
  rdoc_options: []
134
134
  require_paths:
135
135
  - lib
@@ -144,8 +144,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubygems_version: 3.1.2
148
- signing_key:
147
+ rubygems_version: 3.4.21
148
+ signing_key:
149
149
  specification_version: 4
150
150
  summary: fluent plugin for rabbitmq (AMQP)
151
151
  test_files: []