march_hare 2.2.0-java → 2.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0cfa81d0644a594e7da4535491254eefdb3af17a
4
- data.tar.gz: ff8c1b3ffc772a9af93e90fdbff4796a8b7730bc
3
+ metadata.gz: a62cd6766c3f98048cf58bfbf303b2702c801678
4
+ data.tar.gz: d02cccd64d98ee45a4ed842cb02873d508b3c1a9
5
5
  SHA512:
6
- metadata.gz: 6129f2ede1f5b492981a69f6af483cb59c5790f259a81d92350310bc079be048746ee0fcad9f78fe3e8ff7324eed33535affde0637633408f6587b4feac35736
7
- data.tar.gz: d9d0b3482b407fca75a39598a199d3944d966e67ff6d59c2a66386a6a6033cb150bc68cb0b5e6c8e873db3791d4d646064783675b78f466ca3f0c5fa061016ce
6
+ metadata.gz: 109d827d6592930e2f5490f0994f0560f1edcc84fec94ceb9479b10a884a5f9afd263fd53f17a23c28e099ec855385e189b788c2c7769f146cea0d36a4084bbe
7
+ data.tar.gz: 61196e97a7901247c01419b5bd77f36bf0a6c25d5babcea3ad213fd53be4702f8fb76990c9420fc25a709b1a13ff46f2b86d6d1eb81f4088bf67959f23ed8bb4
Binary file
@@ -37,6 +37,7 @@ module MarchHare
37
37
  # @option options [String] :vhost ("/") Virtual host to use
38
38
  # @option options [Integer] :heartbeat (600) Heartbeat interval. 0 means no heartbeat.
39
39
  # @option options [Boolean] :tls (false) Set to true to use TLS/SSL connection. This will switch port to 5671 by default.
40
+ # @option options [java.util.concurrent.ThreadFactory] :thread_factory Thread factory RabbitMQ Java client will use (useful in restricted PaaS platforms such as GAE)
40
41
  #
41
42
  # @see http://rubymarchhare.info/articles/connecting.html Connecting to RabbitMQ guide
42
43
  def self.connect(options={})
@@ -53,6 +54,9 @@ module MarchHare
53
54
  cf.requested_heartbeat = heartbeat_from(options) if include_heartbeat?(options)
54
55
  cf.connection_timeout = connection_timeout_from(options) if include_connection_timeout?(options)
55
56
 
57
+ cf.thread_factory = thread_factory_from(options) if include_thread_factory?(options)
58
+ cf.exception_handler = exception_handler_from(options) if include_exception_handler?(options)
59
+
56
60
  tls = (options[:ssl] || options[:tls])
57
61
  case tls
58
62
  when true then
@@ -348,6 +352,26 @@ module MarchHare
348
352
  !!(options[:connection_timeout_interval] || options[:connection_timeout])
349
353
  end
350
354
 
355
+ # @private
356
+ def self.thread_factory_from(opts)
357
+ opts[:thread_factory]
358
+ end
359
+
360
+ # @private
361
+ def self.include_thread_factory?(opts)
362
+ !!opts[:thread_factory]
363
+ end
364
+
365
+ # @private
366
+ def self.exception_handler_from(opts)
367
+ opts[:exception_handler]
368
+ end
369
+
370
+ # @private
371
+ def self.include_exception_handler?(opts)
372
+ !!opts[:exception_handler]
373
+ end
374
+
351
375
  # Executes a block, catching Java exceptions RabbitMQ Java client throws and
352
376
  # transforms them to Ruby exceptions that are then re-raised.
353
377
  #
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module MarchHare
4
- VERSION = "2.2.0"
4
+ VERSION = "2.3.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.2.0
4
+ version: 2.3.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-05-15 00:00:00.000000000 Z
12
+ date: 2014-06-30 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: