logstash-output-rabbitmq 1.1.0-java → 1.1.1-java

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: 89989010433ce0b5c2eb56006cefbb38eb71e465
4
- data.tar.gz: 004f589a86bbbcb901167a38976c411c2b1d7dab
3
+ metadata.gz: f90bba8313de38efee5748671982e961ccffa45d
4
+ data.tar.gz: c1717cbf3f6fe180019d05f0be50defbe6fd189b
5
5
  SHA512:
6
- metadata.gz: 9cce7f5bd69bd54c440b21f0cb1c89879fec275b58c63c17cc30536e9d2c61646e74e33f968f247e7d44dcd99606704168251aa4f54a31cafc4a08c62483d06d
7
- data.tar.gz: de07d8b894eb6c93bbeb2ed82d70587a5ffd764a2dc924021134e6dae629718c085b496ecfe58f31fce16fd9892e58bfa057c7f9d6c2714b8dbc3e650b0b3138
6
+ metadata.gz: 352f5418b8b42011a5f76d520a184672f75f47e64c7a46104034fca13265568a86a2e35473e2b3262181c1c06abc5b4b346022475c6c414ebb5fa27ca9a73e73
7
+ data.tar.gz: da4785cc8e35380cb40540b9c03c2674ec7dd3709918e785b6281ec39533c9ba83c4436109773664fa3386f3cbb7d41c2a1eb201e3b3d9cb4742fefdd8405219
data/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ * 1.1.1
2
+ - Fix nasty bug that caused connection duplication on conn recovery
1
3
  * 1.1.0
2
4
  - Many internal refactors
3
5
  - Bump march hare version to 2.11.0
@@ -42,7 +42,7 @@ class LogStash::Outputs::RabbitMQ < LogStash::Outputs::Base
42
42
  # Enable or disable logging
43
43
  config :debug, :validate => :boolean, :default => false, :deprecated => "Use the logstash --debug flag for this instead."
44
44
 
45
- # Try to automatically recovery from broken connections. You almost certainly don't want to override this!!!
45
+ # Set this to automatically recover from a broken connection. You almost certainly don't want to override this!!!
46
46
  config :automatic_recovery, :validate => :boolean, :default => true
47
47
 
48
48
  # The exchange type (fanout, topic, direct)
@@ -98,7 +98,6 @@ class LogStash::Outputs::RabbitMQ < LogStash::Outputs::Base
98
98
  :backtrace => e.backtrace)
99
99
 
100
100
  sleep_for_retry
101
- connect!
102
101
  retry
103
102
  end
104
103
 
@@ -142,18 +141,29 @@ class LogStash::Outputs::RabbitMQ < LogStash::Outputs::Base
142
141
  channel = connection.create_channel
143
142
  @logger.info("Connected to RabbitMQ at #{settings[:host]}")
144
143
 
144
+ exchange = declare_exchange!(channel)
145
+
146
+ HareInfo.new(connection, channel, exchange)
147
+ end
148
+
149
+ private
150
+ def declare_exchange!(channel)
145
151
  @logger.debug("Declaring an exchange", :name => @exchange,
146
152
  :type => @exchange_type, :durable => @durable)
147
-
148
153
  exchange = channel.exchange(@exchange, :type => @exchange_type.to_sym, :durable => @durable)
149
154
  @logger.debug("Exchange declared")
150
-
151
- HareInfo.new(connection, channel, exchange)
155
+ exchange
156
+ rescue StandardError => e
157
+ @logger.error("Could not declare exchange!",
158
+ :exchange => @exchange, :type => @exchange_type,
159
+ :durable => @durable, :error_class => e.class.name,
160
+ :error_message => e.message, :backtrace => e.backtrace)
161
+ raise e
152
162
  end
153
163
 
154
164
  private
155
165
  def connect!
156
- @hare_info = connect() unless connection_open?
166
+ @hare_info = connect()
157
167
  rescue MarchHare::Exception => e
158
168
  return if terminating?
159
169
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-rabbitmq'
4
- s.version = '1.1.0'
4
+ s.version = '1.1.1'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Push events to 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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-30 00:00:00.000000000 Z
11
+ date: 2015-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core