Summary
This chapter described in detail how to design and code a Dockerized microservice. In particular, it described how to design its input and output messages and endpoints, as well as how to use a message broker to implement event-based communication. It also described how to handle out-of-order and duplicated messages, concurrent output production with several microservice replicas, and transactional outputs with a database internal queue.
Then, it described how the organization of worker services is based on hosted services and how in this case, commands are carried out in one-to-one correspondence with all input messages. Finally, it described how to code all of the Onion Architecture levels of any microservice.
All concepts were explained through the practical example of the route-planning worker microservice of the book’s case study application. You should now understand the practical usage of the RabbitMQ message broker and the NetTopologySuite
library for...