logstash-input-bunny 0.1.3 → 0.1.4
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 +20 -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: d7a0cd2906d0c9403b16a32f5d9186ea37b4e82a
|
4
|
+
data.tar.gz: 3521871aae65252dd3287142f3e6b4e11f46caee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3f4133716e815eb3b8d18183e2919a0eb0c13baffe7d5f5688b2f0e7d5faf59888a98cb51c70cdd6e1ab9a3d843888c69380ca38227bc39f9ee5b05a5ca3022
|
7
|
+
data.tar.gz: 450dd7462b4c447876d510871ddd88373cca3ddc3c8251ab074fd631eed5929756d918a29d9401810e5c230611e3a02552ea01b8de0ad7b9c440e078d71e1618
|
@@ -129,5 +129,25 @@ class LogStash::Inputs::Bunny < LogStash::Inputs::Threadable
|
|
129
129
|
@settings[:verify_peer] = @verify_peer
|
130
130
|
end
|
131
131
|
end
|
132
|
+
|
133
|
+
def consume
|
134
|
+
consumer_id = "#{`hostname -s`.strip}-#{Thread.current.object_id}"
|
135
|
+
@logger.info("Will consume events from queue #{@q.name} as #{consumer_id}")
|
136
|
+
|
137
|
+
no_ack = !@ack
|
138
|
+
exclusive = @exclusive
|
139
|
+
|
140
|
+
@consumer = Bunny::Consumer.new(@ch, @q, consumer_id, no_ack, exclusive)
|
141
|
+
@consumer.on_delivery do |delivery_info, properties, data|
|
142
|
+
@codec.decode(data) do |event|
|
143
|
+
decorate(event)
|
144
|
+
@output_queue << event
|
145
|
+
end
|
146
|
+
|
147
|
+
@ch.acknowledge(delivery_info.delivery_tag) if @ack
|
148
|
+
end
|
149
|
+
|
150
|
+
@q.subscribe_with(@consumer, block: true)
|
151
|
+
end
|
132
152
|
end # class LogStash::Inputs::RabbitMQ
|
133
153
|
|
@@ -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.4'
|
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"
|