RabbitMQ: advance thru the list of brokers on reconnect
In RabbitMQ implementation, when using multiple rabbit_hosts, we don't want to
immediately retry failed connection for the same failed broker. This was not
the case in existing implementation though, where we've always attempted to
reconnect starting from the first broker in the list of candidates. So if the
first broker failed, we initiated reconnect to the same failed broker.
This change makes reconnect() implementation to select the next broker in the
list. This also means that non-failure reconnect attempts will also switch the
current broker. All in all, users should not rely on any particular order to
use brokers from the list, so this should not constitute an issue.
This is a backport of 71c6866471d628b207d7c5b84bfd37cc9fed0898 from
oslo.messaging.
Change-Id: I67923cb024bbd143edc8edccf35b9b400df31eb3
Partial-Bug: 1261631
(cherry picked from commit abe3e5ee994fddd5141e2cae3f4785ffe62805ea)
Reviewed: https:/ /review. openstack. org/83086 /git.openstack. org/cgit/ openstack/ oslo-incubator/ commit/ ?id=2887edbdba8 e139aaf0fb2b50b 2d94e24d10a963
Committed: https:/
Submitter: Jenkins
Branch: stable/havana
commit 2887edbdba8e139 aaf0fb2b50b2d94 e24d10a963
Author: Ihar Hrachyshka <email address hidden>
Date: Fri Jan 17 13:44:28 2014 +0100
RabbitMQ: advance thru the list of brokers on reconnect
In RabbitMQ implementation, when using multiple rabbit_hosts, we don't want to
immediately retry failed connection for the same failed broker. This was not
the case in existing implementation though, where we've always attempted to
reconnect starting from the first broker in the list of candidates. So if the
first broker failed, we initiated reconnect to the same failed broker.
This change makes reconnect() implementation to select the next broker in the
list. This also means that non-failure reconnect attempts will also switch the
current broker. All in all, users should not rely on any particular order to
use brokers from the list, so this should not constitute an issue.
This is a backport of 71c6866471d628b 207d7c5b84bfd37 cc9fed0898 from
oslo.messaging.
Change-Id: I67923cb024bbd1 43edc8edccf35b9 b400df31eb3 5141e2cae3f4785 ffe62805ea)
Partial-Bug: 1261631
(cherry picked from commit abe3e5ee994fddd