2 – how to select message queue

Time:2021-7-29

Advantages: decoupling, peak clipping, data distribution

Disadvantages include the following:

  • Reduced system availability

    The more external dependencies the system introduces, the worse the stability of the system. Once MQ goes down, it will have an impact on the business.

    How to ensure high availability of MQ?

  • Increased system complexity

    The addition of MQ greatly increases the complexity of the system. In the past, synchronous remote calls were made between systems, but now asynchronous calls are made through MQ.

    How to ensure that messages are not consumed repeatedly? How to deal with message loss? So how to ensure the order of message delivery?

  • Consistency problem

    After processing the business, system a sends message data to systems B, C and D through MQ. If system B and C process successfully, system D process fails.

    How to ensure the consistency of message data processing?

characteristic ActiveMQ RabbitMQ RocketMQ Kafka
development language Java erlang Java Scala
Single machine throughput 10000 class 10000 class 100000 class 100000 class
Timeliness ms us ms ms
usability High, master-slave architecture High, master-slave architecture Very high, distributed architecture Very high, distributed architecture
Functional characteristics Mature products with more documents and better support for various protocols Based on Erlang development, it has strong concurrency, good performance, low latency and rich management interface MQ has complete functions and good expansibility Only major MQ functions are supported, such as message query and message backtracking. They are mainly prepared for big data and are widely used in the field of big data

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Recommended Today

Implementation example of go operation etcd

etcdIt is an open-source, distributed key value pair data storage system, which provides shared configuration, service registration and discovery. This paper mainly introduces the installation and use of etcd. Etcdetcd introduction etcdIt is an open source and highly available distributed key value storage system developed with go language, which can be used to configure sharing […]