def createAMQPListener(username, password, vhost, exchange_name,
                       spec=None, channel=1, verbose=False):
    # use provided spec if not specified
    if not spec:
        spec = txamqp.spec.load(os.path.normpath(
            os.path.join(os.path.dirname(__file__), 'amqp0-8.xml')))

    delegate = TwistedDelegate()
    factory = AMQPReconnectingFactory(username, password, delegate, vhost,
                                      spec, channel, exchange_name,
                                      verbose=verbose)
    return factory
Create an C{AMQPReconnectingFactory} configured with the specified options.
dataset/ETHPy150Open tmm1/graphite/carbon/lib/carbon/amqp_listener.py/createAMQPListener