Red Hat Bugzilla – Bug 495718
Python client needs to have failover for clustering
Last modified: 2018-10-27 09:49:22 EDT
Description of problem: Python client needs to provide failover mechanism for clustered brokers similar to C++. Version-Release number of selected component (if applicable): 1.2 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: If clustered broker fails with python client sessions, then the python clients should automatically failover to the failover broker. Additional info:
BZ is MODIFIED, but it seems not implemented yet / no info how to enable failover and no info on commit revision. Could you possibly write an update what is the status here, please? (adding missing FutureFeature keyword to track it as feature)
You can enable failover with the reconnect and backups options: conn = Connection(..., reconnect=True, backups=[("host", 1234), ...]) If you want to automatically update backups via the failover exchange, you can do this: from qpid.messaging.util import auto_update_backups conn = Connection(..., reconnect=True, backups=[("host", 1234), ...]) auto_update_backups(conn) If you do the auto_update, then you don't need to bother specifying any backups when creating the Connection if you don't want to. The backups will get filled in on the initial update.
The feature has been implemented in high level API. Verified on RHEL 5.5 i386 / x86_64 on packages qpid-cpp-server-0.7.916826-2.el5 python-qpid-0.7.917557-4.el5 Test excersizes modified spout/drain clients against running/not-running/toggling brokers in cluster to see if they are able to reconnect. All three reconnect strategies tested (no reconnection / reconnection from url backup list and reconnection from failover exchange) -> VERIFIED
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: The Messaging Client Python API now provides a failover mechanism for clustered brokers.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0773.html