[rabbitmq-discuss] Turning off prefetch in the asynchronous_consumer_example

Scott Chapman Scott.Chapman at servicenow.com
Fri Mar 8 19:02:07 GMT 2013


It's not auto-ack. That's disabled. I don't want them auto-ack'd.

I don’t want it to "check out the message". That's prefetching. I want it to leave the message alone until it's ready to be processed.

Scott

From: McIntosh Jason <mcintoshj at gmail.com<mailto:mcintoshj at gmail.com>>
Reply-To: Discussions about RabbitMQ <rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>>
Date: Thursday, March 7, 2013 8:12 PM
To: Discussions about RabbitMQ <rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>>
Subject: Re: [rabbitmq-discuss] Turning off prefetch in the asynchronous_consumer_example

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<mailto: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/20130308/62e51210/attachment.htm>


More information about the rabbitmq-discuss mailing list