diff options
author | Wonil Choi <wonil22.choi@samsung.com> | 2018-03-28 09:55:07 +0900 |
---|---|---|
committer | Wonil Choi <wonil0522@gmail.com> | 2018-05-09 06:15:01 +0000 |
commit | 623ba0d0e6858a52cb40d3532f9e12335e53c390 (patch) | |
tree | 79bf6628ff26b13a79128377e40ce365807dfc80 | |
parent | 59cbb86cecaa9dcd42623aef5b89ed3dfd5939ec (diff) | |
download | oslo-messaging-623ba0d0e6858a52cb40d3532f9e12335e53c390.tar.gz |
Revert "rabbit: Don't prefetch when batch_size is set"5.30.3
This reverts commit c881baed29db49c5710795496cb07907e35ceaba.
Eventhough batch_size is set, rabbitMQ prefetch count is not changed
at the first time of connection creation. It works only connection reset
cases(i.e. rabbitMQ restart). So this patch can not fix original issue
https://bugs.launchpad.net/ceilometer/+bug/1551667
Moreover, it makes another bug that messages of sameple queues are not
consumed properly. So revert it.
Change-Id: Ia8ebee8e2a670e46b6a68859bc30e717bd56ed7e
Signed-off-by: Wonil Choi <wonil22.choi@samsung.com>
Closes-bug: 1759755
(cherry picked from commit e0e8a1ea68bcc33d1a07361102eb87d0cfdd94a9)
-rw-r--r-- | oslo_messaging/_drivers/amqpdriver.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/oslo_messaging/_drivers/amqpdriver.py b/oslo_messaging/_drivers/amqpdriver.py index b4d9358..f0b5cf1 100644 --- a/oslo_messaging/_drivers/amqpdriver.py +++ b/oslo_messaging/_drivers/amqpdriver.py @@ -589,12 +589,6 @@ class AMQPDriverBase(base.BaseDriver): def listen_for_notifications(self, targets_and_priorities, pool, batch_size, batch_timeout): conn = self._get_connection(rpc_common.PURPOSE_LISTEN) - # NOTE(sileht): The application set batch_size, so we don't need to - # prefetch more messages, especially for notifications. Notifications - # queues can be really big when the consumer have disapear during a - # long period, and when it come back, kombu/pyamqp will fetch all - # messages it can. So we override the default qos prefetch value - conn.connection.rabbit_qos_prefetch_count = batch_size listener = AMQPListener(self, conn) for target, priority in targets_and_priorities: |