fluent-plugin-rabbitmq 0.0.6 → 0.0.7
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/.gitignore +1 -0
- data/.travis.yml +6 -1
- data/README.md +6 -0
- data/fluent-plugin-rabbitmq.gemspec +2 -2
- data/lib/fluent/plugin/in_rabbitmq.rb +22 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba10e05d65915a58bac7723586f08bab88d3eb265a44cdc2a4fbf60d3153dead
|
4
|
+
data.tar.gz: 7c74417e879e6332f70c943b9c732e7628526687ec8e5613b45767835e36bcd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11358bb5ae097666f025d6eafd3a975fa3295772ab97701c5084bb79d889db624e873d36088ff629015ffe99415ea0d3e2f5971216ce5ed4e10424284783cfd7
|
7
|
+
data.tar.gz: f07b05667ca3593c0d7c858b356d4ed39ab7b7451100493bf8c9cc52e79e728d974b1afa664693db7278a79d0ed3bf6dac7a8baee286c172c60a3251b2e29a92
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -46,10 +46,16 @@ fluentd >= 0.14.0
|
|
46
46
|
|durable|true|false|set durable flag of the queue|
|
47
47
|
|exclusive|true|false|set exclusive flag of the queue|
|
48
48
|
|auto_delete|true|false|set auto_delete flag of the queue|
|
49
|
+
|ttl|60000|nil|queue ttl in ms|
|
49
50
|
|prefetch_count|10|nil||
|
50
51
|
|consumer_pool_size|5|nil||
|
51
52
|
|include_headers|true|false|include headers in events|
|
52
53
|
|headers_key|string|header|key name of headers|
|
54
|
+
|create_exchange|true|false|create exchange or not|
|
55
|
+
|exchange_to_bind|string|nil|exchange to bind created exchange|
|
56
|
+
|exchange_type|direct|topic|type of created exchange|
|
57
|
+
|exchange_routing_key|hoge|nil|created exchange routing key|
|
58
|
+
|exchange_durable|true|false|durability of create exchange|
|
53
59
|
|
54
60
|
### Output
|
55
61
|
|
@@ -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.
|
6
|
+
spec.version = "0.0.7"
|
7
7
|
spec.authors = ["NTT Communications"]
|
8
8
|
spec.email = ["masaki.matsushita@ntt.com"]
|
9
9
|
|
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_runtime_dependency "fluentd", ">= 0.14.0"
|
25
25
|
|
26
|
-
spec.add_dependency "bunny", "~> 2.
|
26
|
+
spec.add_dependency "bunny", "~> 2.14.2"
|
27
27
|
end
|
@@ -34,7 +34,7 @@ module Fluent::Plugin
|
|
34
34
|
config_param :user, :string, default: nil
|
35
35
|
config_param :pass, :string, default: nil, secret: true
|
36
36
|
config_param :vhost, :string, default: nil
|
37
|
-
|
37
|
+
|
38
38
|
config_param :routing_key, :string, default: nil
|
39
39
|
config_param :connection_timeout, :time, default: nil
|
40
40
|
config_param :continuation_timeout, :integer, default: nil
|
@@ -47,6 +47,13 @@ module Fluent::Plugin
|
|
47
47
|
end
|
48
48
|
config_param :consumer_pool_size, :integer, default: nil
|
49
49
|
|
50
|
+
config_param :exchange, :string, default: nil
|
51
|
+
config_param :create_exchange, :bool, default: false
|
52
|
+
config_param :exchange_to_bind, :string, default: nil
|
53
|
+
config_param :exchange_type, :string, default: "topic"
|
54
|
+
config_param :exchange_routing_key, :string, default: nil
|
55
|
+
config_param :exchange_durable, :bool, default: false
|
56
|
+
|
50
57
|
config_param :tls, :bool, default: false
|
51
58
|
config_param :tls_cert, :string, default: nil
|
52
59
|
config_param :tls_key, :string, default: nil
|
@@ -57,8 +64,8 @@ module Fluent::Plugin
|
|
57
64
|
config_param :durable, :bool, default: false
|
58
65
|
config_param :exclusive, :bool, default: false
|
59
66
|
config_param :auto_delete, :bool, default: false
|
60
|
-
|
61
67
|
config_param :prefetch_count, :integer, default: nil
|
68
|
+
config_param :ttl, :integer, default: nil
|
62
69
|
|
63
70
|
config_param :include_headers, :bool, default: false
|
64
71
|
config_param :headers_key, :string, default: "headers"
|
@@ -106,11 +113,23 @@ module Fluent::Plugin
|
|
106
113
|
@bunny.start
|
107
114
|
channel = @bunny.create_channel(nil, @consumer_pool_size)
|
108
115
|
channel.prefetch(@prefetch_count) if @prefetch_count
|
116
|
+
if @create_exchange
|
117
|
+
exchange_options = {
|
118
|
+
durable: @exchange_durable,
|
119
|
+
auto_delete: @auto_delete
|
120
|
+
}
|
121
|
+
@bunny_exchange = Bunny::Exchange.new(channel, @exchange_type, @exchange, exchange_options)
|
122
|
+
if @exchange_to_bind
|
123
|
+
@bunny_exchange.bind(@exchange_to_bind, routing_key: @exchange_routing_key)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
queue_arguments = {"x-message-ttl" => @ttl} if @ttl
|
109
127
|
queue = channel.queue(
|
110
128
|
@queue,
|
111
129
|
durable: @durable,
|
112
130
|
exclusive: @exclusive,
|
113
|
-
auto_delete: @auto_delete
|
131
|
+
auto_delete: @auto_delete,
|
132
|
+
arguments: queue_arguments
|
114
133
|
)
|
115
134
|
if @exchange
|
116
135
|
queue.bind(@exchange, routing_key: @routing_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.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NTT Communications
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 2.
|
103
|
+
version: 2.14.2
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 2.
|
110
|
+
version: 2.14.2
|
111
111
|
description: fluent plugin for rabbitmq (AMQP)
|
112
112
|
email:
|
113
113
|
- masaki.matsushita@ntt.com
|
@@ -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.0.
|
147
|
+
rubygems_version: 3.0.3
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: fluent plugin for rabbitmq (AMQP)
|