logstash-input-rabbitmq 5.1.1 → 5.2.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/CHANGELOG.md +5 -0
- data/lib/logstash/inputs/rabbitmq.rb +8 -5
- data/logstash-input-rabbitmq.gemspec +2 -2
- data/spec/inputs/rabbitmq_spec.rb +6 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 425af10298c6f798e8d62fc4191cc5eed01c2ccc
|
4
|
+
data.tar.gz: 3110a74f2ce80e6336dab525e28abf4283157367
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a301efb81cedfeead47c8a6c1e815f3b038398799a8017d6a22f6e219eaa20803f9766268e4e1d5a145f2b6c300a07d33b856a193284643825ba2cb5e251408
|
7
|
+
data.tar.gz: 79585a7e5224f00056678d762c89b50127e219734e156a4625515be7bfbd5dfe966ebc82678473f91887384555101603ded9cf1736c48d8e756dbe8a2dd24e5f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 5.2.0
|
2
|
+
- Fix behavior where plugin would block on register if server was unavailable
|
3
|
+
Plugin will now always exit register successfully and just log errors on #run
|
4
|
+
- Bumped connection mixin dependency to better handle proxies and error logging
|
5
|
+
|
1
6
|
## 5.1.1
|
2
7
|
- Relax constraint on logstash-core-plugin-api to >= 1.60 <= 2.99
|
3
8
|
|
@@ -171,7 +171,15 @@ module LogStash
|
|
171
171
|
|
172
172
|
def register
|
173
173
|
@internal_queue = java.util.concurrent.ArrayBlockingQueue.new(@prefetch_count*2)
|
174
|
+
end
|
175
|
+
|
176
|
+
def run(output_queue)
|
177
|
+
setup!
|
178
|
+
@output_queue = output_queue
|
179
|
+
consume!
|
180
|
+
end
|
174
181
|
|
182
|
+
def setup!
|
175
183
|
connect!
|
176
184
|
declare_queue!
|
177
185
|
bind_exchange!
|
@@ -185,11 +193,6 @@ module LogStash
|
|
185
193
|
retry
|
186
194
|
end
|
187
195
|
|
188
|
-
def run(output_queue)
|
189
|
-
@output_queue = output_queue
|
190
|
-
consume!
|
191
|
-
end
|
192
|
-
|
193
196
|
def bind_exchange!
|
194
197
|
if @exchange
|
195
198
|
if @exchange_type # Only declare the exchange if @exchange_type is set!
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-rabbitmq'
|
3
|
-
s.version = '5.
|
3
|
+
s.version = '5.2.0'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "Pull events from a RabbitMQ exchange."
|
6
6
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
# Gem dependencies
|
22
22
|
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
|
23
|
-
s.add_runtime_dependency "logstash-mixin-rabbitmq_connection", '>= 4.
|
23
|
+
s.add_runtime_dependency "logstash-mixin-rabbitmq_connection", '>= 4.2.0', '< 5.0.0'
|
24
24
|
|
25
25
|
s.add_runtime_dependency 'logstash-codec-json'
|
26
26
|
|
@@ -36,13 +36,14 @@ describe LogStash::Inputs::RabbitMQ do
|
|
36
36
|
allow(instance).to receive(:connect!).and_call_original
|
37
37
|
allow(::MarchHare).to receive(:connect).and_return(connection)
|
38
38
|
allow(connection).to receive(:create_channel).and_return(channel)
|
39
|
+
allow(connection).to receive(:on_shutdown)
|
39
40
|
allow(connection).to receive(:on_blocked)
|
40
41
|
allow(connection).to receive(:on_unblocked)
|
41
42
|
allow(channel).to receive(:exchange).and_return(exchange)
|
42
43
|
allow(channel).to receive(:queue).and_return(queue)
|
43
44
|
allow(channel).to receive(:prefetch=)
|
44
45
|
|
45
|
-
allow(queue).to receive(:build_consumer).with(:
|
46
|
+
allow(queue).to receive(:build_consumer).with(:on_cancellation => anything)
|
46
47
|
allow(queue).to receive(:subscribe_with).with(any_args)
|
47
48
|
allow(queue).to receive(:bind).with(any_args)
|
48
49
|
end
|
@@ -57,6 +58,7 @@ describe LogStash::Inputs::RabbitMQ do
|
|
57
58
|
context "without an exchange declared" do
|
58
59
|
before do
|
59
60
|
instance.register
|
61
|
+
instance.setup!
|
60
62
|
end
|
61
63
|
|
62
64
|
it "should set the queue correctly" do
|
@@ -77,9 +79,10 @@ describe LogStash::Inputs::RabbitMQ do
|
|
77
79
|
allow(instance).to receive(:declare_exchange!)
|
78
80
|
end
|
79
81
|
|
80
|
-
context "on
|
82
|
+
context "on run" do
|
81
83
|
before do
|
82
84
|
instance.register
|
85
|
+
instance.setup!
|
83
86
|
end
|
84
87
|
|
85
88
|
it "should bind to the exchange" do
|
@@ -102,6 +105,7 @@ describe LogStash::Inputs::RabbitMQ do
|
|
102
105
|
|
103
106
|
it "should reconnect" do
|
104
107
|
instance.register
|
108
|
+
instance.setup!
|
105
109
|
expect(queue).to have_received(:bind).with(any_args).twice()
|
106
110
|
end
|
107
111
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-rabbitmq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -35,7 +35,7 @@ dependencies:
|
|
35
35
|
requirements:
|
36
36
|
- - ">="
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version: 4.
|
38
|
+
version: 4.2.0
|
39
39
|
- - "<"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 5.0.0
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 4.
|
49
|
+
version: 4.2.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 5.0.0
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
131
|
rubyforge_project:
|
132
|
-
rubygems_version: 2.
|
132
|
+
rubygems_version: 2.4.8
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Pull events from a RabbitMQ exchange.
|