logstash-input-rabbitmq 3.1.4 → 3.1.5
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 +3 -0
- data/lib/logstash/inputs/rabbitmq.rb +17 -24
- data/logstash-input-rabbitmq.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f93375b1eaa4816cd3abbef1aeaa4f6d4f80045f
|
4
|
+
data.tar.gz: 4f06a024d67fcc9da7e5c8a4a1fb1ee2aa44ea2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0da602e8f34599aca96f97057a59bb9f2a12b67c5b37c72f5c08a5fdfcf9b5a7f2272840235acd31e4dd994ff1d673a247f339560782db5944a5b41221a8ff7
|
7
|
+
data.tar.gz: 6cc9ab957d7e94ef0dd154a3e3d920d58d4e4dcb603a5589860a60c68f7850eee63ead3aa0a3d08c8cc9178863c64aba44f78d2577481d2141658f654f3c58ed
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 3.1.5
|
2
|
+
- Fix a bug where when reconnecting a duplicate consumer would be created
|
3
|
+
|
1
4
|
## 3.1.4
|
2
5
|
- Fix a bug where this plugin would not properly reconnect if it lost its connection to the server while the connection would re-establish itself, the queue subscription would not
|
3
6
|
|
@@ -102,32 +102,25 @@ module LogStash
|
|
102
102
|
# that we rely on MarchHare to do the reconnection for us with auto_reconnect.
|
103
103
|
# Unfortunately, while MarchHare does the reconnection work it won't re-subscribe the consumer
|
104
104
|
# hence the logic below.
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
decorate(event)
|
110
|
-
@output_queue << event if event
|
111
|
-
end
|
112
|
-
@hare_info.channel.ack(metadata.delivery_tag) if @ack
|
113
|
-
end
|
114
|
-
|
115
|
-
if @hare_info.connection.connected?
|
116
|
-
@logger.info("Will subscribe with consumer", :config => config)
|
117
|
-
@hare_info.queue.subscribe_with(@consumer, :manual_ack => @ack, :block => true)
|
118
|
-
@logger.warn("Queue subscription ended! Will retry in #{@subscription_retry_interval_seconds}s", :config => config)
|
119
|
-
else
|
120
|
-
@logger.info("RabbitMQ connection down, will wait to retry subscription", :config => config)
|
121
|
-
end
|
122
|
-
|
123
|
-
break if stop?
|
124
|
-
@consumer.gracefully_shut_down # Try to clean up gracefully
|
125
|
-
rescue MarchHare::Exception => e
|
126
|
-
@logger.warn("Error re-subscribing to queue!", :config => config, :message => e.message, :class => e.class.name)
|
105
|
+
@consumer = @hare_info.queue.build_consumer() do |metadata, data|
|
106
|
+
@codec.decode(data) do |event|
|
107
|
+
decorate(event)
|
108
|
+
@output_queue << event if event
|
127
109
|
end
|
110
|
+
@hare_info.channel.ack(metadata.delivery_tag) if @ack
|
111
|
+
end
|
112
|
+
|
113
|
+
begin
|
114
|
+
@hare_info.queue.subscribe_with(@consumer, :manual_ack => @ack)
|
115
|
+
rescue MarchHare::Exception => e
|
116
|
+
@logger.warn("Could not subscribe to queue! Will retry in #{@subscription_retry_interval_seconds} seconds", :queue => @queue)
|
117
|
+
|
118
|
+
sleep @subscription_retry_interval_seconds
|
119
|
+
retry
|
120
|
+
end
|
128
121
|
|
129
|
-
|
130
|
-
|
122
|
+
while !stop?
|
123
|
+
sleep 1
|
131
124
|
end
|
132
125
|
end
|
133
126
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-rabbitmq'
|
3
|
-
s.version = '3.1.
|
3
|
+
s.version = '3.1.5'
|
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/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-input-rabbitmq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core
|