I've decided to explore more in the software development world to do so I made this repo to work around message brokers such as NATS, RabbitMQ, Kafka, etc. I will put all the snippet codes I've done here also, I'll try to show you all different aspects of each message broker. Message brokers are widely used in EDA(Event-Driven Architecture).
git clone https://github.com/Milad75Rasouli/MessageBrokersJourney
Here is the way that you can run the examples:
- Go to the project directory.
cd MessageBrokersJourney
- Perform this command to run RabbitMQ in your local machine:
sudo docker-compose up rabbitmq
Note
If you could perform the command successfully, you might want to take a look at the RabbitMQ Management at http://localhost:15672 and username and password are up to you. You can find them in docker-compose.yml file.
- Perform this command to run a consumer(you can perform this command as many as you like in different terminals/CMD to get more consumer)
just pc-run
Important
If you have a problem with justhttps://github.com/casey/just you might need to install it on you machine first and put the installation path in your Linux/Windows PATH
- Perform this command to run a producer
just pp-run
-
Nothing! but if you'd like to see more examples you can checkout to other commits. they are listed here:
-
Perform this command whenever you are done and want to shut the RabbitMQ service:
sudo docker-compose down rabbitmq -v
Tip
The command must be performed in the main project directory.
Take a look at here for more examples
Here is how you can run the examples:
- Go to the project directory.
cd MessageBrokersJourney
- Perform this command to run NATS in your local machine:
sudo docker-compose up nats
Note
If you could perform the command successfully, you might want to take a look at the NATS monitoring at http://localhost:8222 you don't need any passwords for that.