Understanding Microservices Choreography Using RabbitMQ and Node.js

A colleague and I had discussed the choreography of microservices a while ago and the topic came up for discussion again recently. In order to ensure that I understood the nuances correctly, I decided to write some code to implement the approach. Here are the tools/technologies that I chose:

  • Node.js for building the microservices.
  • Restify for exposing Restful APIs.
  • CloudAMQP — a RabbitMQ as a service offering as the integration bus.
  • amqp.node — a Node.js client library for RabbitMQ.

CloudAMQP offers a free tier good enough for learning and trying things out. It also comes with an easy to use management console that gives good statistics. The tutorials and articles are useful too. There is a host of options for the Node.js RabbitMQ client libraries. I tried a few and then settled with amqp.node as the RabbitMQ site had their tutorials based on it. The library comes in two flavors, one with callbacks and the other with promises. Being comfortable with callbacks, I opted for it.