Red Hat Bugzilla – Bug 507828
unable add broker in python qmf with URL which contains password
Last modified: 2009-10-06 12:17:37 EDT
Description of problem:
Session.addBroker target could be "amqp://guest:guest@localhost:5672" acording http://qpid.apache.org/connection-url-format.html but if I try to run this short example, it doesn't work:
from qmf.console import Session
qmf_session = Session();
broker = qmf_session.addBroker("amqp://guest:guest@localhost:5672", 10);
except Exception, e:
raise "Cannot connect to the broker. %s" % e
"amqp://localhost", "amqp://localhost:5672", "amqp://guest@localhost:5672" work fine.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Example doesn't add broker to session.
Example adds broker to session.
The documentation link above refers to Java documentation, not Python.
I believe that these URL formats should be the same across languages. Which should we use? Is this a bug in the Python API or the Java documentation?
The format for passwords in the Python API calls for using a slash ('/') between the username and password, not a colon (':') as was tried.
The referenced documentation is for the Java API which has some differences, unfortunately including the URL format.