logstash-input-bunny 0.1.6 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f5ae3a768a1cee9c4438269e6be934875118a636
4
- data.tar.gz: 90edd6aafcc28f5a877816b4c26d04bb54d95139
3
+ metadata.gz: 387f0338bb56c721e24114287e63ce6c0b957451
4
+ data.tar.gz: 082cf44717c378ee33b53b61790b4e111659f30a
5
5
  SHA512:
6
- metadata.gz: fff369a4be4a87b55f681d6e1eed0920f4c89bbde6548ce06ba31d3c0a3a50118a482303960102ecf0e74277ec28f2c239f018cbb5da65754d571292ac88c89c
7
- data.tar.gz: e1b108eaee585bbe4427f890f3afe077c543ea3541c836d2b7850af251e448162a168faf8a946a304322e1ae97a526a2fd67bb51252e3ea4be48b072762b5e50
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.6'
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-bunny
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Serafini