march_hare 2.22.0-java → 3.0.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/ext/rabbitmq-client.jar +0 -0
- data/lib/ext/slf4j-api.jar +0 -0
- data/lib/ext/slf4j-simple.jar +0 -0
- data/lib/march_hare.rb +5 -1
- data/lib/march_hare/channel.rb +1 -1
- data/lib/march_hare/session.rb +15 -1
- data/lib/march_hare/version.rb +1 -1
- metadata +4 -3
- data/lib/ext/commons-io.jar +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 24c5f476a2e6d0f317060d847bac5b3415a6af9e
|
|
4
|
+
data.tar.gz: cbd1a71d51155ca8898b89983c3409b08a914378
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26dcc481444be82948f0234e493ab7c943e4f292e5f455e53acf1a1405b622846bf734d8f6bae3f10e06951b96ba760667fcc1a3e614484328fad7b61d486e87
|
|
7
|
+
data.tar.gz: 69586d383dacb082c63221b51fed78795d94d31377b77cf296cfd5a46b8ed348d39373916d75c617a70c450df09df87434f247396e842311abc61babc6c13089
|
data/lib/ext/rabbitmq-client.jar
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/march_hare.rb
CHANGED
data/lib/march_hare/channel.rb
CHANGED
|
@@ -985,7 +985,7 @@ module MarchHare
|
|
|
985
985
|
def guarding_against_stale_delivery_tags(tag, &block)
|
|
986
986
|
case tag
|
|
987
987
|
# if a fixnum was passed, execute unconditionally. MK.
|
|
988
|
-
when
|
|
988
|
+
when Integer then
|
|
989
989
|
block.call
|
|
990
990
|
# versioned delivery tags should be checked to avoid
|
|
991
991
|
# sending out stale (invalid) tags after channel was reopened
|
data/lib/march_hare/session.rb
CHANGED
|
@@ -9,6 +9,7 @@ module MarchHare
|
|
|
9
9
|
java_import com.rabbitmq.client.Connection
|
|
10
10
|
java_import com.rabbitmq.client.BlockedListener
|
|
11
11
|
java_import com.rabbitmq.client.NullTrustManager
|
|
12
|
+
java_import com.rabbitmq.client.MissedHeartbeatException
|
|
12
13
|
|
|
13
14
|
java_import javax.net.ssl.SSLContext
|
|
14
15
|
java_import javax.net.ssl.KeyManagerFactory
|
|
@@ -121,6 +122,13 @@ module MarchHare
|
|
|
121
122
|
# @private
|
|
122
123
|
def initialize(connection_factory, opts = {})
|
|
123
124
|
@cf = connection_factory
|
|
125
|
+
|
|
126
|
+
# March Hare uses its own connection recovery implementation and
|
|
127
|
+
# as of Java client 4.x automatic recovery is enabled by
|
|
128
|
+
# default. MK.
|
|
129
|
+
@cf.automatic_recovery_enabled = false
|
|
130
|
+
@cf.topology_recovery_enabled = false
|
|
131
|
+
|
|
124
132
|
@uri = opts[:uri]
|
|
125
133
|
@uses_uri = !(@uri.nil?)
|
|
126
134
|
# executors cannot be restarted after shutdown,
|
|
@@ -239,7 +247,7 @@ module MarchHare
|
|
|
239
247
|
# @private
|
|
240
248
|
def add_automatic_recovery_hook
|
|
241
249
|
fn = Proc.new do |_, signal|
|
|
242
|
-
if
|
|
250
|
+
if should_initiate_connection_recovery?(signal)
|
|
243
251
|
self.automatically_recover
|
|
244
252
|
end
|
|
245
253
|
end
|
|
@@ -247,6 +255,11 @@ module MarchHare
|
|
|
247
255
|
@automatic_recovery_hook = self.on_shutdown(&fn)
|
|
248
256
|
end
|
|
249
257
|
|
|
258
|
+
# @private
|
|
259
|
+
def should_initiate_connection_recovery?(signal)
|
|
260
|
+
!signal.initiated_by_application || signal.instance_of?(MissedHeartbeatException)
|
|
261
|
+
end
|
|
262
|
+
|
|
250
263
|
# @private
|
|
251
264
|
def disable_automatic_recovery
|
|
252
265
|
@connection.remove_shutdown_listener(@automatic_recovery_hook) if @automatic_recovery_hook
|
|
@@ -321,6 +334,7 @@ module MarchHare
|
|
|
321
334
|
#
|
|
322
335
|
# So we stub out #start in case someone migrating from Bunny forgets to remove
|
|
323
336
|
# the call to #start. MK.
|
|
337
|
+
self
|
|
324
338
|
end
|
|
325
339
|
|
|
326
340
|
def username
|
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:
|
|
4
|
+
version: 3.0.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: 2017-
|
|
12
|
+
date: 2017-02-20 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:
|
|
@@ -19,8 +19,9 @@ executables: []
|
|
|
19
19
|
extensions: []
|
|
20
20
|
extra_rdoc_files: []
|
|
21
21
|
files:
|
|
22
|
-
- lib/ext/commons-io.jar
|
|
23
22
|
- lib/ext/rabbitmq-client.jar
|
|
23
|
+
- lib/ext/slf4j-api.jar
|
|
24
|
+
- lib/ext/slf4j-simple.jar
|
|
24
25
|
- lib/march_hare.rb
|
|
25
26
|
- lib/march_hare/channel.rb
|
|
26
27
|
- lib/march_hare/consumers.rb
|
data/lib/ext/commons-io.jar
DELETED
|
Binary file
|