Microservice basic design
In this section, we will define all the main microservice abstractions, that is, the overall communication strategy, all Onion Architecture commands and events, and the top-level loops of the required hosted services. We will start with a description of the chosen message broker: RabbitMQ.
The message broker: RabbitMQ
Natively, RabbitMQ supports the AMQP asynchronous message protocol, which is one of the most used asynchronous protocols, the other being MQTT, which has a specific syntax for the publisher/subscriber pattern. Support for MQTT can be added with a plugin, but RabbitMQ has facilities for easily implementing a publisher/subscriber pattern on top of AMQP. Moreover, RabbitMQ offers several tools to support scalability, disaster recovery, and redundancy, so it fulfills all requirements to be a first-class actor in cloud and microservices environments. More specifically, by defining a RabbitMQ cluster, we may achieve both load balancing and...