Introduction and common messaging middleware messaging middleware comparison

First, why should the use of message queues

1. decoupled and asynchronous

Using message queues may become asynchronous call synchronous calls, while reducing the degree of coupling between system modules

Decoupling

2. Clipping

Object when the system pressure is too large, the operation of the cache in the message queue, the message is read back continuously operated, achieve peak clipping

Clipping

3. Multiplexing (scalability)

If you want to send a message to the system A plurality of systems, each additional subsystem case, the code would need to modify the system A, then using message queues, system A sends a message to the message queue, the other system can read the message. Just to the message queue and when the new system were to read the message

Multiplexing

Second, the need for precautions

1. Note that improve usability

MQ when the server goes down, the backup program.

2. The complexity of the system to improve

  1. Message repeated consumption problem
  2. Message loss problem
  3. Message delivery order issue

3. Consistency

When the multi-processing system with a message, a synchronous call returns a failure can be directly, using an asynchronous call how the message queue processing

Third, the common messaging middleware comparison

ActiveMQ RabbitMQ RocketMQ Kafka
Implementation language java erlang java scala
Throughput Ten thousand Ten thousand One hundred thousand One hundred thousand
aging ms Microsecond ms ms
Availability High (master-slave) High (master-slave) Very high (distributed) Very high (distributed)
Published 17 original articles · won praise 1 · views 651

Guess you like

Origin blog.csdn.net/c_c_y_CC/article/details/102509615