lib/amqp/channel.rb in amqp-0.9.4 vs lib/amqp/channel.rb in amqp-0.9.5
- old
+ new
@@ -262,10 +262,13 @@
return unless auto_recovering?
self.open do
@channel_is_open_deferrable.succeed
+ # re-establish prefetch
+ self.prefetch(@options[:prefetch], false) if @options[:prefetch]
+
# exchanges must be recovered first because queue recovery includes recovery of bindings. MK.
@exchanges.each { |name, e| e.auto_recover }
@queues.each { |name, q| q.auto_recover }
end
end # auto_recover
@@ -281,9 +284,12 @@
@id = self.class.next_channel_id
self.class.release_channel_id(old_id)
self.open do
@channel_is_open_deferrable.succeed
+
+ # re-establish prefetch
+ self.prefetch(@options[:prefetch], false) if @options[:prefetch]
# exchanges must be recovered first because queue recovery includes recovery of bindings. MK.
@exchanges.each { |name, e| e.auto_recover }
@queues.each { |name, q| q.auto_recover }
end