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

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.

主站蜘蛛池模板: 玉树县| 密云县| 荥经县| 泸溪县| 贺兰县| 申扎县| 凯里市| 四子王旗| 辽源市| 韶山市| 丹东市| 郑州市| 昌黎县| 禹城市| 湟源县| 拜城县| 潮州市| 舒城县| 上杭县| 如皋市| 翁牛特旗| 井研县| 林周县| 叙永县| 石泉县| 当阳市| 武川县| 绥棱县| 尉犁县| 海安县| 沁源县| 海城市| 双牌县| 思茅市| 紫阳县| 尉氏县| 青海省| 武川县| 寻乌县| 屏东县| 厦门市|