Refactor for RabbitMQ