Qpid: advance thru the list of brokers on reconnect
In Qpid implementation, when using multiple qpid_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 the following changes from oslo.messaging:
* I257c2ad6d7ebead356c0239134340975da6dbc07 (code change)
* I32e20c0e747e6489dab4b0358d422b8a9c6b982e (unit test).
Reviewed: https:/ /review. openstack. org/67449 /git.openstack. org/cgit/ openstack/ oslo-incubator/ commit/ ?id=7fe95de20cc dfa5aa523ccb8a9 ca3afdde5eddbb
Committed: https:/
Submitter: Jenkins
Branch: master
commit 7fe95de20ccdfa5 aa523ccb8a9ca3a fdde5eddbb
Author: Ihar Hrachyshka <email address hidden>
Date: Thu Jan 16 18:22:49 2014 +0100
Qpid: advance thru the list of brokers on reconnect
In Qpid implementation, when using multiple qpid_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 the following changes from oslo.messaging: d356c0239134340 975da6dbc07 (code change) 89dab4b0358d422 b8a9c6b982e (unit test).
* I257c2ad6d7ebea
* I32e20c0e747e64
Change-Id: Ia148baa6e1ec63 2789ac3621c8517 3c2c16f3918
Partial-Bug: 1261631