Changed the code to use RabbitMQ (blocking connection).