fluent-plugin-rabbitmq 0.1.5 → 0.1.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/README.md +5 -0
- data/fluent-plugin-rabbitmq.gemspec +3 -3
- data/lib/fluent/plugin/in_rabbitmq.rb +29 -1
- data/lib/fluent/plugin/out_rabbitmq.rb +5 -0
- 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: b176f575d9bab4d2bb68bff2a8790e88df1c0f7df266ee0f725f364e14e49c47
|
|
4
|
+
data.tar.gz: 73484875820d9c48ab7c828f49f43e31ec4c067a34dc3b549fe72d9cc261e0e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0c82dbfd41cd7aa0b4ff3642580896c2449dbcf905e77ce2aff0ad5a6ccc5a9f78a167a222e61698b99f4d2c10e98b143beb1e975f41ee0ce8031db52e499b6
|
|
7
|
+
data.tar.gz: 043bc89bb9df0097943a88fdfa9bc1da3b45b4030fa8636fdd16bdb8626492c92c9c59ed5d296d6bc7f4d112dc5f76c7d94c7fcdaf9f6099b8e5d349c49a8d55
|
data/README.md
CHANGED
|
@@ -47,11 +47,14 @@ fluentd >= 0.14.0
|
|
|
47
47
|
|durable|true|false|set durable flag of the queue|
|
|
48
48
|
|exclusive|true|false|set exclusive flag of the queue|
|
|
49
49
|
|auto_delete|true|false|set auto_delete flag of the queue|
|
|
50
|
+
|queue_no_declare|true|false|passive declare option for queue|
|
|
50
51
|
|ttl|60000|nil|queue ttl in ms|
|
|
51
52
|
|prefetch_count|10|nil||
|
|
52
53
|
|consumer_pool_size|5|nil||
|
|
53
54
|
|include_headers|true|false|include headers in events|
|
|
54
55
|
|headers_key|string|header|key name of headers|
|
|
56
|
+
|include_properties|true|false|include AMQP basic properties (content_type, content_encoding, delivery_mode, priority, correlation_id, reply_to, expiration, message_id, timestamp, type, user_id, app_id, cluster_id) in events|
|
|
57
|
+
|properties_key|string|properties|key name of properties|
|
|
55
58
|
|create_exchange|true|false|create exchange or not|
|
|
56
59
|
|exchange_to_bind|string|nil|exchange to bind created exchange|
|
|
57
60
|
|exchange_type|direct|topic|type of created exchange|
|
|
@@ -110,6 +113,8 @@ tls_cert /path/to/cert
|
|
|
110
113
|
tls_key /path/to/key
|
|
111
114
|
tls_ca_certificates ["/path/to/ca_certificate"]
|
|
112
115
|
verify_peer true
|
|
116
|
+
tls_protocol TLSv1_3 # pin a TLS version instead of negotiating, e.g. TLSv1_2 or TLSv1_3
|
|
117
|
+
tls_silence_warnings false # suppress Bunny's warnings about a missing client certificate and disabled peer verification
|
|
113
118
|
```
|
|
114
119
|
|
|
115
120
|
### Other Configurations for Input/Output
|
|
@@ -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.7"
|
|
7
7
|
spec.authors = ["NTT DOCOMO BUSINESS"]
|
|
8
8
|
spec.email = ["masaki.matsushita@ntt.com"]
|
|
9
9
|
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
spec.add_development_dependency "ltsv"
|
|
24
24
|
spec.add_development_dependency "msgpack"
|
|
25
25
|
|
|
26
|
-
spec.add_runtime_dependency "fluentd", ">= 1.0
|
|
26
|
+
spec.add_runtime_dependency "fluentd", ">= 1.0"
|
|
27
27
|
|
|
28
|
-
spec.add_dependency "bunny", "~>
|
|
28
|
+
spec.add_dependency "bunny", "~> 3.4"
|
|
29
29
|
end
|
|
@@ -53,24 +53,30 @@ module Fluent::Plugin
|
|
|
53
53
|
config_param :exchange_type, :string, default: "topic"
|
|
54
54
|
config_param :exchange_routing_key, :string, default: nil
|
|
55
55
|
config_param :exchange_durable, :bool, default: false
|
|
56
|
+
config_param :exchange_no_declare, :bool, default: false
|
|
56
57
|
|
|
57
58
|
config_param :tls, :bool, default: false
|
|
58
59
|
config_param :tls_cert, :string, default: nil
|
|
59
60
|
config_param :tls_key, :string, default: nil
|
|
60
61
|
config_param :tls_ca_certificates, :array, default: nil
|
|
61
62
|
config_param :verify_peer, :bool, default: true
|
|
63
|
+
config_param :tls_protocol, :string, default: nil
|
|
64
|
+
config_param :tls_silence_warnings, :bool, default: nil
|
|
62
65
|
|
|
63
66
|
config_param :queue, :string
|
|
64
67
|
config_param :durable, :bool, default: false
|
|
65
68
|
config_param :exclusive, :bool, default: false
|
|
66
69
|
config_param :auto_delete, :bool, default: false
|
|
70
|
+
config_param :queue_no_declare, :bool, default: false
|
|
67
71
|
config_param :prefetch_count, :integer, default: nil
|
|
68
72
|
config_param :ttl, :integer, default: nil
|
|
69
73
|
|
|
70
74
|
config_param :include_headers, :bool, default: false
|
|
71
75
|
config_param :include_delivery_info, :bool, default: false
|
|
76
|
+
config_param :include_properties, :bool, default: false
|
|
72
77
|
config_param :headers_key, :string, default: "headers"
|
|
73
78
|
config_param :delivery_info_key, :string, default: "delivery_info"
|
|
79
|
+
config_param :properties_key, :string, default: "properties"
|
|
74
80
|
config_param :manual_ack, :bool, default: false
|
|
75
81
|
config_param :queue_mode, :string, default: nil
|
|
76
82
|
config_param :queue_type, :string, default: nil
|
|
@@ -105,6 +111,9 @@ module Fluent::Plugin
|
|
|
105
111
|
bunny_options[:tls_key] = @tls_key if @tls_key
|
|
106
112
|
bunny_options[:tls_ca_certificates] = @tls_ca_certificates if @tls_ca_certificates
|
|
107
113
|
bunny_options[:verify_peer] = @verify_peer
|
|
114
|
+
# Bunny resolves the version against a table keyed by symbols, e.g. :TLSv1_3
|
|
115
|
+
bunny_options[:tls_protocol] = @tls_protocol.to_sym if @tls_protocol
|
|
116
|
+
bunny_options[:tls_silence_warnings] = @tls_silence_warnings unless @tls_silence_warnings.nil?
|
|
108
117
|
|
|
109
118
|
@parser = parser_create
|
|
110
119
|
|
|
@@ -120,7 +129,8 @@ module Fluent::Plugin
|
|
|
120
129
|
if @create_exchange
|
|
121
130
|
exchange_options = {
|
|
122
131
|
durable: @exchange_durable,
|
|
123
|
-
auto_delete: @auto_delete
|
|
132
|
+
auto_delete: @auto_delete,
|
|
133
|
+
no_declare: @exchange_no_declare
|
|
124
134
|
}
|
|
125
135
|
@bunny_exchange = Bunny::Exchange.new(channel, @exchange_type, @exchange, exchange_options)
|
|
126
136
|
if @exchange_to_bind
|
|
@@ -136,6 +146,7 @@ module Fluent::Plugin
|
|
|
136
146
|
durable: @durable,
|
|
137
147
|
exclusive: @exclusive,
|
|
138
148
|
auto_delete: @auto_delete,
|
|
149
|
+
no_declare: @queue_no_declare,
|
|
139
150
|
arguments: queue_arguments
|
|
140
151
|
)
|
|
141
152
|
if @exchange
|
|
@@ -156,6 +167,23 @@ module Fluent::Plugin
|
|
|
156
167
|
if @include_delivery_info
|
|
157
168
|
record[@delivery_info_key] = delivery_info
|
|
158
169
|
end
|
|
170
|
+
if @include_properties
|
|
171
|
+
record[@properties_key] = {
|
|
172
|
+
"content_type" => properties[:content_type],
|
|
173
|
+
"content_encoding" => properties[:content_encoding],
|
|
174
|
+
"delivery_mode" => properties[:delivery_mode],
|
|
175
|
+
"priority" => properties[:priority],
|
|
176
|
+
"correlation_id" => properties[:correlation_id],
|
|
177
|
+
"reply_to" => properties[:reply_to],
|
|
178
|
+
"expiration" => properties[:expiration],
|
|
179
|
+
"message_id" => properties[:message_id],
|
|
180
|
+
"timestamp" => properties[:timestamp] ? properties[:timestamp].to_i : nil,
|
|
181
|
+
"type" => properties[:type],
|
|
182
|
+
"user_id" => properties[:user_id],
|
|
183
|
+
"app_id" => properties[:app_id],
|
|
184
|
+
"cluster_id" => properties[:cluster_id]
|
|
185
|
+
}
|
|
186
|
+
end
|
|
159
187
|
router.emit(@tag, time, record)
|
|
160
188
|
end
|
|
161
189
|
rescue Fluent::Plugin::Parser::ParserError => e
|
|
@@ -48,6 +48,8 @@ module Fluent::Plugin
|
|
|
48
48
|
config_param :tls_key, :string, default: nil
|
|
49
49
|
config_param :tls_ca_certificates, :array, default: nil
|
|
50
50
|
config_param :verify_peer, :bool, default: true
|
|
51
|
+
config_param :tls_protocol, :string, default: nil
|
|
52
|
+
config_param :tls_silence_warnings, :bool, default: nil
|
|
51
53
|
|
|
52
54
|
config_param :exchange, :string
|
|
53
55
|
config_param :exchange_type, :string
|
|
@@ -96,6 +98,9 @@ module Fluent::Plugin
|
|
|
96
98
|
bunny_options[:tls_key] = @tls_key if @tls_key
|
|
97
99
|
bunny_options[:tls_ca_certificates] = @tls_ca_certificates if @tls_ca_certificates
|
|
98
100
|
bunny_options[:verify_peer] = @verify_peer
|
|
101
|
+
# Bunny resolves the version against a table keyed by symbols, e.g. :TLSv1_3
|
|
102
|
+
bunny_options[:tls_protocol] = @tls_protocol.to_sym if @tls_protocol
|
|
103
|
+
bunny_options[:tls_silence_warnings] = @tls_silence_warnings unless @tls_silence_warnings.nil?
|
|
99
104
|
|
|
100
105
|
@bunny = Bunny.new(bunny_options)
|
|
101
106
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- NTT DOCOMO BUSINESS
|
|
@@ -85,28 +85,28 @@ dependencies:
|
|
|
85
85
|
requirements:
|
|
86
86
|
- - ">="
|
|
87
87
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: 1.0
|
|
88
|
+
version: '1.0'
|
|
89
89
|
type: :runtime
|
|
90
90
|
prerelease: false
|
|
91
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
|
93
93
|
- - ">="
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 1.0
|
|
95
|
+
version: '1.0'
|
|
96
96
|
- !ruby/object:Gem::Dependency
|
|
97
97
|
name: bunny
|
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
|
100
100
|
- - "~>"
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version:
|
|
102
|
+
version: '3.4'
|
|
103
103
|
type: :runtime
|
|
104
104
|
prerelease: false
|
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
|
107
107
|
- - "~>"
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version:
|
|
109
|
+
version: '3.4'
|
|
110
110
|
description: fluent plugin for rabbitmq (AMQP)
|
|
111
111
|
email:
|
|
112
112
|
- masaki.matsushita@ntt.com
|