lib/mq.rb in tmm1-amqp-0.6.1 vs lib/mq.rb in tmm1-amqp-0.6.3

- old
+ new

@@ -143,11 +143,11 @@ conn.callback{ |c| @channel = c.add_channel(self) send Protocol::Channel::Open.new } end - attr_reader :channel + attr_reader :channel, :connection # May raise a MQ::Error exception when the frame payload contains a # Protocol::Channel::Close object. # # This usually occurs when a client attempts to perform an illegal @@ -728,9 +728,13 @@ if blk @error_callback = blk else @error_callback.call(msg) if @error_callback and msg end + end + + def prefetch(size) + send Protocol::Basic::Qos.new(:prefetch_size => 0, :prefetch_count => size, :global => false) end # Returns a hash of all the exchange proxy objects. # # Not typically called by client code. \ No newline at end of file