make transport options configurable
fix amqp connection in thread