logstash-input-bunny 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 487f8d41ea9e2a064b28f88d2fd529e7377d7b95
4
- data.tar.gz: 8d3dcccf5a8cbef0c613b4719ec2d5721b06db19
3
+ metadata.gz: 8238a1a39e481d7fcf15ee72f9bde6bf2ee199e7
4
+ data.tar.gz: 39104fa26e88ec08af8d6e9b9cc54c5ccab6d729
5
5
  SHA512:
6
- metadata.gz: 6923f0ef09f74d11e50263cc1968ae298d80bb3617c200fbd2507965f57284e1b14c2c35d306385a291cf25d79a363c34a626837c906e8ee376d33c7bf6c198a
7
- data.tar.gz: 143ff56b99187dbb006efc7cf9db8c8aff5e54fcb7ce71b0fedeefa9029996abef3582a7a3faaf83c8342395a9eaaf14f8bd912e844913ef50983260384293c5
6
+ metadata.gz: a4fa70c7d75686779ab76f5d11b185a92dd75b53db651ed6da8a8b833fcbff2fa09d4188c933a54b6a5ed2cfaf0ef43245dae5d95908e728d9c5395b30c5b0d2
7
+ data.tar.gz: 9b6a99dea0f7253db067d238f75191154fb69757f6fd631460cd6a51acc0c1006e964ab382cf911791d73a262131a5ed785bf41190c579d0d56a5cb774de89ec
@@ -110,6 +110,14 @@ class LogStash::Inputs::Bunny < LogStash::Inputs::Threadable
110
110
 
111
111
  super
112
112
  end
113
+
114
+ def consumer_id
115
+ @consumer_id ||= "#{`hostname -s`.strip}-#{Thread.current.object_id}"
116
+ end
117
+
118
+ def input_name
119
+ @exchange.nil? or @key.nil? ? queue : "#{@exchange}:#{@key}"
120
+ end
113
121
 
114
122
  include ::LogStash::Inputs::RabbitMQ::BunnyImpl
115
123
 
@@ -128,7 +136,7 @@ class LogStash::Inputs::Bunny < LogStash::Inputs::Threadable
128
136
  # make sure we don't leave any consumer work pool
129
137
  # threads behind. MK.
130
138
  @ch.maybe_kill_consumer_work_pool!
131
- @logger.error("RabbitMQ connection error: #{e.message}. Will attempt to reconnect in #{n} seconds...")
139
+ @logger.error("RabbitMQ[#{input_name}] connection error: #{e.message}. Will attempt to reconnect in #{n} seconds...")
132
140
 
133
141
  sleep n
134
142
  retry
@@ -136,7 +144,7 @@ class LogStash::Inputs::Bunny < LogStash::Inputs::Threadable
136
144
  rescue OpenSSL::SSL::SSLError => e
137
145
  n = Bunny::Session::DEFAULT_NETWORK_RECOVERY_INTERVAL * 2
138
146
 
139
- @logger.error("RabbitMQ SSL connection error: #{e.message}. Will attempt to reconnect in #{n} seconds...")
147
+ @logger.error("RabbitMQ[#{input_name}] SSL connection error: #{e.message}. Will attempt to reconnect in #{n} seconds...")
140
148
  sleep n
141
149
  retry
142
150
 
@@ -144,7 +152,7 @@ class LogStash::Inputs::Bunny < LogStash::Inputs::Threadable
144
152
  # ignore and quit
145
153
 
146
154
  rescue Exception => e
147
- @logger.error("RabbitMQ unhandled exception: #{e.inspect}")
155
+ @logger.error("RabbitMQ[#{input_name}] unhandled exception: #{e.inspect}")
148
156
  @logger.error(e.backtrace)
149
157
  end
150
158
  end
@@ -168,7 +176,6 @@ class LogStash::Inputs::Bunny < LogStash::Inputs::Threadable
168
176
  end
169
177
 
170
178
  def consume
171
- consumer_id = "#{`hostname -s`.strip}-#{Thread.current.object_id}"
172
179
  @logger.info("Will consume events from queue #{@q.name} as #{consumer_id}")
173
180
 
174
181
  no_ack = !@ack
@@ -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.9'
4
+ s.version = '0.1.10'
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.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Serafini