logstash-input-bunny 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/inputs/bunny.rb +24 -0
- data/logstash-input-bunny.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 387f0338bb56c721e24114287e63ce6c0b957451
|
4
|
+
data.tar.gz: 082cf44717c378ee33b53b61790b4e111659f30a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9ef83e3d35f8399ee2cb9714a339c0db0cfe2d0710eb462607da44c85737f8de082e051141b1ce1d8429545bbad10c5c040f0da6709891834cf46876b703636
|
7
|
+
data.tar.gz: e267fbd48de4e03ee3e7dfcd25f6afb44d9ce2c1170099027ea3ab4f799c616834ee4100e718f7d1f2a7cbfbe9ae009bbdcc22ab798dae0f7fdcaef844621273
|
@@ -113,6 +113,30 @@ class LogStash::Inputs::Bunny < LogStash::Inputs::Threadable
|
|
113
113
|
|
114
114
|
include ::LogStash::Inputs::RabbitMQ::BunnyImpl
|
115
115
|
|
116
|
+
def run(output_queue)
|
117
|
+
@output_queue = output_queue
|
118
|
+
|
119
|
+
begin
|
120
|
+
setup
|
121
|
+
consume
|
122
|
+
rescue Bunny::NetworkFailure, Bunny::ConnectionClosedError,
|
123
|
+
Bunny::ConnectionLevelException, Bunny::TCPConnectionFailed => e
|
124
|
+
n = Bunny::Session::DEFAULT_NETWORK_RECOVERY_INTERVAL * 2
|
125
|
+
|
126
|
+
# Because we manually reconnect instead of letting Bunny
|
127
|
+
# handle failures,
|
128
|
+
# make sure we don't leave any consumer work pool
|
129
|
+
# threads behind. MK.
|
130
|
+
@ch.maybe_kill_consumer_work_pool!
|
131
|
+
@logger.error("RabbitMQ connection error: #{e.message}. Will attempt to reconnect in #{n} seconds...")
|
132
|
+
|
133
|
+
sleep n
|
134
|
+
retry
|
135
|
+
rescue LogStash::ShutdownSignal
|
136
|
+
# ignore and quit
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
116
140
|
def register
|
117
141
|
super
|
118
142
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-bunny'
|
4
|
-
s.version = '0.1.
|
4
|
+
s.version = '0.1.7'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Pull events from a RabbitMQ exchange."
|
7
7
|
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|