[rabbitmq-discuss] Turning off prefetch in the asynchronous_consumer_example

McIntosh Jason mcintoshj at gmail.com
Fri Mar 8 04:12:18 GMT 2013


Are you sure you're not seeing it as an auto-ack issue?  Not sure enough of what's going on, but if you're only seeing one un-ack'd message when the second comes in, it's just checked out the message and waiting for an ack.  If you want to auto-acknowledge the messages, I believe that's an option to the consumer. 

Jason

On Mar 7, 2013, at 12:16 PM, Scott Chapman wrote:

> Code from here:
> https://github.com/pika/pika/blob/master/docs/examples/asynchronous_consumer_example.rst
> 
> I've tried putting the qos call here:
> 
>     def on_channel_open(self, channel):
>         """This method is invoked by pika when the channel has been opened.
>         The channel object is passed in so we can make use of it.
> 
>         Since the channel is now open, we'll declare the exchange to use.
> 
>         :param pika.channel.Channel channel: The channel object
> 
>         """
>         LOGGER.debug('Channel opened')
>         channel.basic_qos(prefetch_count=1)
>         self._channel = channel
>         self.add_on_channel_close_callback()
>         self.setup_exchange(self.EXCHANGE)
> 
> It did not turn off prefetching.  Messages still show up in RabbitMQ as Unacknowledged rather than Ready when I send one and send a 2nd before the 1st is done processing.
> 
> What am I missing?
> 
> I want to turn off prefetching.
> I can't figure out how to turn it off on the Connection. That would be preferable, or turn it off globally.
> 
> Any clues GREATLY appreciated.
> 
> Thanks,
> Scott
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130307/d27be711/attachment.htm>


More information about the rabbitmq-discuss mailing list