bunny 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bunny.rb +1 -1
- data/lib/bunny/client.rb +23 -0
- data/lib/bunny/queue.rb +5 -2
- data/lib/qrack/qrack.rb +1 -1
- metadata +2 -2
data/lib/bunny.rb
CHANGED
data/lib/bunny/client.rb
CHANGED
@@ -265,6 +265,29 @@ _Bunny_::_ProtocolError_ is raised. If successful, _Client_._status_ is set to <
|
|
265
265
|
end
|
266
266
|
|
267
267
|
alias start start_session
|
268
|
+
|
269
|
+
=begin rdoc
|
270
|
+
|
271
|
+
=== DESCRIPTION:
|
272
|
+
|
273
|
+
Asks the broker to redeliver all unacknowledged messages on a specifieid channel. Zero or
|
274
|
+
more messages may be redelivered.
|
275
|
+
|
276
|
+
==== Options:
|
277
|
+
|
278
|
+
* <tt>:requeue => true or false (_default_)</tt> - If set to _false_, the message will be
|
279
|
+
redelivered to the original recipient. If set to _true_, the server will attempt to requeue
|
280
|
+
the message, potentially then delivering it to an alternative subscriber.
|
281
|
+
|
282
|
+
=end
|
283
|
+
|
284
|
+
def recover(opts = {})
|
285
|
+
|
286
|
+
send_frame(
|
287
|
+
Qrack::Protocol::Basic::Recover.new({ :requeue => false }.merge(opts))
|
288
|
+
)
|
289
|
+
|
290
|
+
end
|
268
291
|
|
269
292
|
private
|
270
293
|
|
data/lib/bunny/queue.rb
CHANGED
@@ -50,9 +50,12 @@ ask to confirm a single message or a set of messages up to and including a speci
|
|
50
50
|
|
51
51
|
=end
|
52
52
|
|
53
|
-
def ack
|
53
|
+
def ack(opts={})
|
54
|
+
# If delivery tag is nil then set it to 1 to prevent errors
|
55
|
+
self.delivery_tag = 1 if self.delivery_tag.nil?
|
56
|
+
|
54
57
|
client.send_frame(
|
55
|
-
Qrack::Protocol::Basic::Ack.new(:delivery_tag => delivery_tag)
|
58
|
+
Qrack::Protocol::Basic::Ack.new({:delivery_tag => delivery_tag, :multiple => false}.merge(opts))
|
56
59
|
)
|
57
60
|
|
58
61
|
# reset delivery tag
|
data/lib/qrack/qrack.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bunny
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Duncan
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-22 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|