RPC over AMQP

AMQP also implements a synchronous request/response pattern, which means that we could use RabbitMQ instead of the usual HTTP JSON calls to have our microservice directly interact.

This pattern is a very appealing way to have two microservices communicate directly with each other. Some frameworks, such as Nameko (http://nameko.readthedocs.io) are using it to build microservices.

But the benefits of using RPC over AMQP rather than REST or RPC over HTTP are not that obvious unless the communication channel you want to set up is specific and maybe not part of the published API. Sticking with a single API is probably better to keep your microservices as simple as possible.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset