In this sample application, I have used Docker to setup RabbitMQ & MySQL database. You can find the docker-compose.yml file below
docker-compose.yml File for MySQL & RabbitMQ
When application starts, SpringBoot CommandLineRunner will post an Order in RabbitMQ.
For sample purpose, I have kept both RabbitMQ sender & receiver in this same application.
RabbitMQ Receiver class will read the Order object from Queue & insert the Order details in MySQL table