A microservice example using nodejs.
RabbitMQ (optional: with management)
This example uses Docker to run RabbitMQ.
If using a Mac you’ll need to use boot2docker to run Docker containers. See: https://docs.docker.com/installation/mac/
Get the RabbitMQ Docker image with management:
docker run -d -e RABBITMQ_NODENAME=my-rabbit --name my-rabbit -p 5672:5672 -p 15672:15672 rabbitmq:3-management
(See: https://registry.hub.docker.com/__/rabbitmq/)
This command runs RabbitMQ with management console. It explicitly maps the ports, which also maps the IPs. This might differ when running on Linux / Mac because of boot2docker. On Linux you might be able to use the localhost IP, on Mac you need to use boot2docker IP.
http://[boot2dockerIP]:15672, guest, guest
host: [boot2dockerIP]
port: 5672
login: 'guest'
password: 'guest'
vhost: '/'
1. nodemon service/monitor.js
2. nodemon service/need.js
3. nodemon service/solution.js
4. nodemon service/solutionSelector.js
5. nodemon service/membership.js
[*] Get a handle to the exchange from the exchange-name - creates a new exchange if non-existant, otherwise returns the existing exchange