march_hare 2.4.0-java → 2.5.0-java
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/lib/march_hare/channel.rb +1 -1
- data/lib/march_hare/exceptions.rb +2 -1
- data/lib/march_hare/metadata.rb +5 -0
- data/lib/march_hare/session.rb +7 -5
- data/lib/march_hare/version.rb +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: 73b8a86e921a22e112e007dbf65cedf99ac93bfc
|
4
|
+
data.tar.gz: 147ad313b6744b8b7b1a37991817221d7bdff723
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8720708bf788850d224c5bb46ef6376f2a18c04f82578e65ca32f5951eefa259e210fcb3b2b39c817415a76257d4d43394f5a75fa03ceceaf55d02d93984f4ad
|
7
|
+
data.tar.gz: 85d2c3825083117a09cd55d13ddd117c36e5d26b678250a229c58daa21808d326a9d95df62b54ea667495a2a969e5a324c2cebb0a2091bf4a44526dc8a56604f
|
data/lib/march_hare/channel.rb
CHANGED
data/lib/march_hare/metadata.rb
CHANGED
@@ -7,6 +7,11 @@ module MarchHare
|
|
7
7
|
@consumer_tag = consumer_tag
|
8
8
|
@envelope = envelope
|
9
9
|
@properties = properties
|
10
|
+
|
11
|
+
# Prime the delivery tag when the instance is created. If #delivery_tag is first
|
12
|
+
# called after a recovery, then it'll fail to mismatch and will allow an invalid
|
13
|
+
# ack/nack, which will cause the channel to unexpectedly close
|
14
|
+
@delivery_tag = delivery_tag
|
10
15
|
end
|
11
16
|
|
12
17
|
def ack(options={})
|
data/lib/march_hare/session.rb
CHANGED
@@ -197,13 +197,13 @@ module MarchHare
|
|
197
197
|
# recovering immediately makes little sense. Wait a bit first. MK.
|
198
198
|
java.lang.Thread.sleep(ms)
|
199
199
|
|
200
|
-
|
200
|
+
new_connection = converting_rjc_exceptions_to_ruby do
|
201
201
|
reconnecting_on_network_failures(ms) do
|
202
202
|
self.new_connection_impl
|
203
203
|
end
|
204
204
|
end
|
205
205
|
@thread_pool = ThreadPools.dynamically_growing
|
206
|
-
self.recover_shutdown_hooks
|
206
|
+
self.recover_shutdown_hooks(new_connection)
|
207
207
|
|
208
208
|
# sorting channels by id means that the cases like the following:
|
209
209
|
#
|
@@ -219,18 +219,20 @@ module MarchHare
|
|
219
219
|
# in the order the user expects and before bindings.
|
220
220
|
@channels.sort_by {|id, _| id}.each do |id, ch|
|
221
221
|
begin
|
222
|
-
ch.automatically_recover(self,
|
222
|
+
ch.automatically_recover(self, new_connection)
|
223
223
|
rescue Exception, java.io.IOException => e
|
224
224
|
# TODO: logging
|
225
225
|
$stderr.puts e
|
226
226
|
end
|
227
227
|
end
|
228
|
+
|
229
|
+
@connection = new_connection
|
228
230
|
end
|
229
231
|
|
230
232
|
# @private
|
231
|
-
def recover_shutdown_hooks
|
233
|
+
def recover_shutdown_hooks(connection)
|
232
234
|
@shutdown_hooks.each do |sh|
|
233
|
-
|
235
|
+
connection.add_shutdown_listener(sh)
|
234
236
|
end
|
235
237
|
end
|
236
238
|
|
data/lib/march_hare/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: march_hare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Theo Hultberg
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: RabbitMQ client for JRuby built around the official RabbitMQ Java client
|
15
15
|
email:
|