lib/amqp/channel.rb in amqp-1.1.8 vs lib/amqp/channel.rb in amqp-1.2.0

- old
+ new

@@ -293,11 +293,11 @@ when 1 then block.call(ch) else block.call(ch, open_ok) end # case end # if - self.prefetch(options[:prefetch], false) if options[:prefetch] + self.prefetch(@options[:prefetch], false) if @options[:prefetch] end # self.open end # @connection.on_open end # @return [Boolean] true if this channel is in automatic recovery mode @@ -995,11 +995,13 @@ # @return [Channel] self # # @api public def prefetch(count, global = false, &block) self.once_open do - # RabbitMQ as of 2.3.1 does not support prefetch_size. + # RabbitMQ does not support prefetch_size. self.qos(0, count, global, &block) + + @options[:prefetch] = count end self end