fluent-plugin-rabbitmq 0.0.7 → 0.1.0
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/README.md +4 -2
- data/Rakefile +1 -1
- data/fluent-plugin-rabbitmq.gemspec +2 -2
- data/lib/fluent/plugin/in_rabbitmq.rb +12 -3
- data/lib/fluent/plugin/out_rabbitmq.rb +2 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f8aa321e95ea389c5a2da190c4c899ab4377c3ea8215f07f89696d43c9b13f5
|
4
|
+
data.tar.gz: fa13e44c14381053880790dcd86548bfb00084c3fd2459c89f7abc88be649919
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e00b8f18807b574404f2157648a144f1ed8e23e8b6ef15efb4e677aab1f1d28b85ceb78a095408caaff0b33becd57a888af1f8b758f6ba22fb0517e3d7433b9b
|
7
|
+
data.tar.gz: cc218b853f71edcb0c543a3927e695917610a488888e0dcb396a7d1e83cc79b179237b9bc064afccab9984fa517a6d374ad163d35fd5cc1d737315dc2a01df96
|
data/.gitignore
CHANGED
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
|
|
data/Rakefile
CHANGED
@@ -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.1.0"
|
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.14.
|
26
|
+
spec.add_dependency "bunny", "~> 2.14.4"
|
27
27
|
end
|
@@ -68,7 +68,11 @@ module Fluent::Plugin
|
|
68
68
|
config_param :ttl, :integer, default: nil
|
69
69
|
|
70
70
|
config_param :include_headers, :bool, default: false
|
71
|
+
config_param :include_delivery_info, :bool, default: false
|
71
72
|
config_param :headers_key, :string, default: "headers"
|
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
|
72
76
|
|
73
77
|
def initialize
|
74
78
|
super
|
@@ -94,7 +98,6 @@ module Fluent::Plugin
|
|
94
98
|
bunny_options[:recovery_attempts] = @recovery_attempts
|
95
99
|
bunny_options[:auth_mechanism] = @auth_mechanism if @auth_mechanism
|
96
100
|
bunny_options[:heartbeat] = @heartbeat if @heartbeat
|
97
|
-
bunny_options[:logger] = log
|
98
101
|
|
99
102
|
bunny_options[:tls] = @tls
|
100
103
|
bunny_options[:tls_cert] = @tls_cert if @tls_cert
|
@@ -123,7 +126,9 @@ module Fluent::Plugin
|
|
123
126
|
@bunny_exchange.bind(@exchange_to_bind, routing_key: @exchange_routing_key)
|
124
127
|
end
|
125
128
|
end
|
126
|
-
queue_arguments = {
|
129
|
+
queue_arguments = {}
|
130
|
+
queue_arguments["x-message-ttl"] = @ttl if @ttl
|
131
|
+
queue_arguments["x-queue-mode"] = @queue_mode if @queue_mode
|
127
132
|
queue = channel.queue(
|
128
133
|
@queue,
|
129
134
|
durable: @durable,
|
@@ -134,7 +139,7 @@ module Fluent::Plugin
|
|
134
139
|
if @exchange
|
135
140
|
queue.bind(@exchange, routing_key: @routing_key)
|
136
141
|
end
|
137
|
-
queue.subscribe do |delivery_info, properties, payload|
|
142
|
+
queue.subscribe(manual_ack: @manual_ack) do |delivery_info, properties, payload|
|
138
143
|
@parser.parse(payload) do |time, record|
|
139
144
|
time = if properties[:timestamp]
|
140
145
|
Fluent::EventTime.from_time(properties[:timestamp])
|
@@ -144,8 +149,12 @@ module Fluent::Plugin
|
|
144
149
|
if @include_headers
|
145
150
|
record[@headers_key] = properties.headers
|
146
151
|
end
|
152
|
+
if @include_delivery_info
|
153
|
+
record[@delivery_info_key] = delivery_info
|
154
|
+
end
|
147
155
|
router.emit(@tag, time, record)
|
148
156
|
end
|
157
|
+
channel.ack(delivery_info.delivery_tag) if @manual_ack
|
149
158
|
end
|
150
159
|
end
|
151
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, :
|
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
|
|
@@ -89,7 +89,6 @@ module Fluent::Plugin
|
|
89
89
|
bunny_options[:recovery_attempts] = @recovery_attempts
|
90
90
|
bunny_options[:auth_mechanism] = @auth_mechanism if @auth_mechanism
|
91
91
|
bunny_options[:heartbeat] = @heartbeat if @heartbeat
|
92
|
-
bunny_options[:logger] = log
|
93
92
|
bunny_options[:frame_max] = @frame_max if @frame_max
|
94
93
|
|
95
94
|
bunny_options[:tls] = @tls
|
@@ -106,7 +105,7 @@ module Fluent::Plugin
|
|
106
105
|
@publish_options[:persistent] = @persistent if @persistent
|
107
106
|
@publish_options[:mandatory] = @mandatory if @mandatory
|
108
107
|
@publish_options[:expiration] = @expiration if @expiration
|
109
|
-
@publish_options[:
|
108
|
+
@publish_options[:type] = @message_type if @message_type
|
110
109
|
@publish_options[:priority] = @priority if @priority
|
111
110
|
@publish_options[:app_id] = @app_id if @app_id
|
112
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
|
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:
|
11
|
+
date: 2023-11-02 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.14.
|
103
|
+
version: 2.14.4
|
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.14.
|
110
|
+
version: 2.14.4
|
111
111
|
description: fluent plugin for rabbitmq (AMQP)
|
112
112
|
email:
|
113
113
|
- masaki.matsushita@ntt.com
|
@@ -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.
|
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: []
|