Reordered code in AMQP adapter