Working version with input and output via RabbitMQ.