march_hare 2.1.2-java → 2.2.0-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: c275fc15d1a7b00ec3dc6f34a5ef50a1b0046395
4
- data.tar.gz: 233e98ccc0ae76bda34f5b626f8a0aa231944ef7
3
+ metadata.gz: 0cfa81d0644a594e7da4535491254eefdb3af17a
4
+ data.tar.gz: ff8c1b3ffc772a9af93e90fdbff4796a8b7730bc
5
5
  SHA512:
6
- metadata.gz: ed4664238f267016c446d8dad3f09cb45188a474a4522e3f2dc013244192ca4ba2ab331a0421a201dd37a9a10c86a85dd9e08bed1d25d3debaa1a396d0aafaac
7
- data.tar.gz: e8f4c63cf7be9d79e19dbbde04ae16169f925d918fda728d5277148a326e58b13a83f12d1cf1b08dcf00cf9ee604b16d121e8763c9a1c1109704b2c5db206feb
6
+ metadata.gz: 6129f2ede1f5b492981a69f6af483cb59c5790f259a81d92350310bc079be048746ee0fcad9f78fe3e8ff7324eed33535affde0637633408f6587b4feac35736
7
+ data.tar.gz: d9d0b3482b407fca75a39598a199d3944d966e67ff6d59c2a66386a6a6033cb150bc68cb0b5e6c8e873db3791d4d646064783675b78f466ca3f0c5fa061016ce
Binary file
@@ -129,6 +129,7 @@ module MarchHare
129
129
  # from having to worry about this. MK.
130
130
  @consumers = JavaConcurrent::ConcurrentHashMap.new
131
131
  @shutdown_hooks = Array.new
132
+ @confirm_hooks = Array.new
132
133
  @recoveries_counter = JavaConcurrent::AtomicInteger.new(0)
133
134
 
134
135
  on_shutdown do |ch, cause|
@@ -188,6 +189,7 @@ module MarchHare
188
189
 
189
190
  self.recover_prefetch_setting
190
191
  self.recover_confirm_mode
192
+ self.recover_confirm_hooks
191
193
  self.recover_tx_mode
192
194
  self.recover_exchanges
193
195
  # # this includes bindings recovery
@@ -208,6 +210,13 @@ module MarchHare
208
210
  end
209
211
  end
210
212
 
213
+ # @private
214
+ def recover_confirm_hooks
215
+ @confirm_hooks.each do |ch|
216
+ @delegate.add_confirm_listener(ch)
217
+ end
218
+ end
219
+
211
220
  # Recovers basic.qos setting. Used by the Automatic Network Failure
212
221
  # Recovery feature.
213
222
  #
@@ -836,14 +845,6 @@ module MarchHare
836
845
  end
837
846
  end
838
847
 
839
- # Enables or disables channel flow. This feature id deprecated
840
- # in RabbitMQ.
841
- def channel_flow(active)
842
- converting_rjc_exceptions_to_ruby do
843
- @delegate.channel_flow(active)
844
- end
845
- end
846
-
847
848
  # Defines a returned message handler.
848
849
  # @see http://rubymarchhare.info/articles/exchanges.html Exchanges and Publishers guide
849
850
  def on_return(&block)
@@ -853,7 +854,9 @@ module MarchHare
853
854
  # Defines a publisher confirm handler
854
855
  # @see http://rubymarchhare.info/articles/exchanges.html Exchanges and Publishers guide
855
856
  def on_confirm(&block)
856
- self.add_confirm_listener(BlockConfirmListener.from(block))
857
+ ch = BlockConfirmListener.from(block)
858
+ self.add_confirm_listener(ch)
859
+ @confirm_hooks << ch
857
860
  end
858
861
 
859
862
  def method_missing(selector, *args)
@@ -97,20 +97,20 @@ module MarchHare
97
97
  class Exceptions
98
98
  def self.convert(e, unwrap_io_exception = true)
99
99
  case e
100
+ when java.net.SocketException then
101
+ IOError.new
100
102
  when java.io.IOException then
101
103
  c = e.cause
102
104
 
103
- if unwrap_io_exception
105
+ if c && unwrap_io_exception
104
106
  convert(c, false)
105
107
  else
106
- c
108
+ IOError.new
107
109
  end
108
110
  when com.rabbitmq.client.AlreadyClosedException then
109
111
  ChannelAlreadyClosed.new(e.reason)
110
112
  when com.rabbitmq.client.ShutdownSignalException then
111
- cmd = e.reason
112
-
113
- exception_for_protocol_method(cmd.method)
113
+ exception_for_protocol_method(e.reason)
114
114
  else
115
115
  e
116
116
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module MarchHare
4
- VERSION = "2.1.2"
4
+ VERSION = "2.2.0"
5
5
  end
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.1.2
4
+ version: 2.2.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-02-04 00:00:00.000000000 Z
12
+ date: 2014-05-15 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:
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  version: '0'
57
57
  requirements: []
58
58
  rubyforge_project: march_hare
59
- rubygems_version: 2.2.1
59
+ rubygems_version: 2.2.2
60
60
  signing_key:
61
61
  specification_version: 4
62
62
  summary: RabbitMQ client for JRuby built around the official RabbitMQ Java client