官术网_书友最值得收藏!

Message broker – Async communication between services

In the previous topic, we talked about synchronous communication between microservices using binary and alternatives to REST. This topic will deal with the communication between microservices using message broker, that is, a messaging system with a physical element, a communication layer, and a message bus.

With messaging systems, it is impossible to reproduce the Death Star. The design of the Death Star in a more robust application would be something like the following:

The diagram of a messaging system is totally different, similar to the one shown in the following:

The message bus can be used for both synchronous and asynchronous communication, but certainly, the major point of emphasis of the message bus is in asynchronous communication.

You may wonder, if the messaging diagram is simpler and you can use this type of tool for synchronous communication, why not use this messaging for all types of communication between microservices?

The answer to this question is quite simple. A message bus is a physical component within the stack of microservices. It needs to be scaled just like any other physical component-based data storage and cache. This means that with a high-volume message, the synchronous mode of communication could be committed to an unwanted delay in the responses of the processes.

It is critical to the engineering team to understand where to correctly apply each tool without compromising the stack because of an apparent ease.

Within the various message brokers, there are some that stand out more, such as:

  • ActiveMQ
  • RabbitMQ
  • Kafka

Let us understand the functioning of each of them a little better.

主站蜘蛛池模板: 观塘区| 灌南县| 宜良县| 颍上县| 牟定县| 宜章县| 黔江区| 林口县| 璧山县| 青岛市| 宁城县| 广河县| 黄梅县| 海阳市| 巴中市| 阿克苏市| 孟州市| 富蕴县| 敖汉旗| 灌云县| 南城县| 武城县| 温泉县| 新丰县| 巴南区| 大荔县| 安多县| 台南县| 贡嘎县| 保康县| 龙口市| 长宁区| 南汇区| 安西县| 比如县| 安远县| 乳山市| 泌阳县| 阿城市| 山阴县| 汨罗市|