hot_bunnies 2.0.0.pre7-java → 2.0.0.pre8-java
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hot_bunnies/consumers.rb +3 -2
- data/lib/hot_bunnies/juc.rb +1 -0
- data/lib/hot_bunnies/session.rb +11 -0
- data/lib/hot_bunnies/version.rb +1 -1
- metadata +2 -2
@@ -102,12 +102,13 @@ module HotBunnies
|
|
102
102
|
def initialize(channel, opts, callback, executor)
|
103
103
|
super(channel, callback)
|
104
104
|
@executor = executor
|
105
|
-
@
|
105
|
+
@executor_submit = executor.java_method(:submit, [JavaConcurrent::Runnable.java_class])
|
106
|
+
@opts = opts
|
106
107
|
end
|
107
108
|
|
108
109
|
def deliver(headers, message)
|
109
110
|
unless @executor.shutdown?
|
110
|
-
@
|
111
|
+
@executor_submit.call do
|
111
112
|
begin
|
112
113
|
callback(headers, message)
|
113
114
|
rescue Exception => e
|
data/lib/hot_bunnies/juc.rb
CHANGED
data/lib/hot_bunnies/session.rb
CHANGED
@@ -95,6 +95,17 @@ module HotBunnies
|
|
95
95
|
@connection.heartbeat = n
|
96
96
|
end
|
97
97
|
|
98
|
+
def start
|
99
|
+
# no-op
|
100
|
+
#
|
101
|
+
# This method mimics Bunny::Session#start in Bunny 0.9.
|
102
|
+
# Without it, #method_missing will proxy the call to com.rabbitmq.client.AMQConnection,
|
103
|
+
# which happens to have a #start method which is not idempotent.
|
104
|
+
#
|
105
|
+
# So we stub out #start in case someone migrating from Bunny forgets to remove
|
106
|
+
# the call to #start. MK.
|
107
|
+
end
|
108
|
+
|
98
109
|
def method_missing(selector, *args)
|
99
110
|
@connection.__send__(selector, *args)
|
100
111
|
end
|
data/lib/hot_bunnies/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hot_bunnies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.pre8
|
5
5
|
prerelease: 6
|
6
6
|
platform: java
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-07-
|
13
|
+
date: 2013-07-04 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: RabbitMQ client for JRuby built around the official RabbitMQ Java client
|
16
16
|
email:
|