lib/amqp/channel.rb in amqp-1.0.1 vs lib/amqp/channel.rb in amqp-1.0.2
- old
+ new
@@ -279,10 +279,13 @@
end # auto_recover
# Can be used to recover channels from channel-level exceptions. Allocates a new channel id and reopens
# itself with this new id, releasing the old id after the new one is allocated.
#
+ # This includes recovery of known exchanges, queues and bindings, exactly the same way as when
+ # the client recovers from a network failure.
+ #
# @api public
def reuse
old_id = @id
# must release after we allocate a new id, otherwise we will end up
# with the same value. MK.
@@ -840,16 +843,16 @@
def queue!(name, opts = {}, &block)
queue = if block.nil?
Queue.new(self, name, opts)
else
shim = Proc.new { |q, method|
- if block.arity == 1
- block.call(q)
- else
- queue = find_queue(method.queue)
- block.call(queue, method.consumer_count, method.message_count)
- end
- }
+ if block.arity == 1
+ block.call(q)
+ else
+ queue = find_queue(method.queue)
+ block.call(queue, method.consumer_count, method.message_count)
+ end
+ }
Queue.new(self, name, opts, &shim)
end
register_queue(queue)
end