Improved setup of AMQP connection.