

def createClient(amqp_host, amqp_vhost, amqp_port=5672):
    amqp_spec = txamqp.spec.loadString(specs.v0_8)
    amqp_delegate = TwistedDelegate()
    client = ClientCreator(reactor, AMQClient, delegate=amqp_delegate, vhost=amqp_vhost, spec=amqp_spec, heartbeat=30).connectTCP(amqp_host, amqp_port)
    return client

dataset/ETHPy150Open wehriam/awspider/awspider/amqp/amqp.py createClient/original