Home  >  Article  >  What are message queues?

What are message queues?

hzc
hzcOriginal
2020-06-29 11:30:5914609browse

The message queues include: 1. RabbitMQ, which is a reusable enterprise messaging system based on AMQP. It is one of the most mainstream message middlewares currently; 2. ActiveMQ, which is a fully supported [JMS Provider] implementation of JMS1.1 and J2EE1.4 specifications.

What are message queues?

1 RabbitMQ

RabbitMQ was released in 2007 and is based on AMQP (Advanced Message Queuing Protocol). A reusable enterprise messaging system, it is one of the most mainstream messaging middleware currently.

Main features:

  • Reliability: Provides a variety of technologies that allow you to trade off between performance and reliability. These technologies include persistence mechanisms, delivery confirmations, publisher confirmations, and high availability mechanisms;

  • Flexible routing: Messages are routed through switches before arriving at the queue. RabbitMQ provides several built-in switch types for typical routing logic. If you have more complex routing requirements, you can combine these switches. You can even implement your own switch type and use it as a RabbitMQ plug-in;

  • Message cluster: in Multiple RabbitMQ servers in the same LAN can be aggregated together and used as an independent logical agent;

  • Queue high availability: The queue can be mirrored on machines in the cluster to Ensure message security despite hardware problems;

  • Multiple protocol support: support multiple message queue protocols; the server side is written in Erlang language, supporting everything you can think of Programming language;

  • Management interface: RabbitMQ has an easy-to-use user interface that allows users to monitor and manage many aspects of the message Broker;

  • Tracking mechanism: If the message is abnormal, RabbitMQ provides a message tracking mechanism so that users can find out what happened;

  • Plug-in mechanism: Many plug-ins are provided to expand in many aspects. You can also write your own plug-in;

2 ActiveMQ

ActiveMQ is produced by Apache, ActiveMQ is a fully supports JMS1.1 and J2EE 1.4 Standard JMS Provider implementation. It is very fast, supports multiple language clients and protocols, can be easily embedded into enterprise application environments, and has many advanced features.

Main features:

  • Comply with JMS specification: JMS specification provides good standards and guarantees, including: synchronous or asynchronous message distribution, once and only once messages Distribution, message reception and subscription, etc. The advantage of complying with the JMS specification is that these basic features are available regardless of which JMS implementation provider is used;

  • Connectivity: ActiveMQ provides a wide range of connection options, and the supported protocols are : HTTP/S, IP Multicast, SSL, STOMP, TCP, UDP, XMPP and more. Support for many protocols gives ActiveMQ great flexibility.

  • Supports many types of protocols: OpenWire, STOMP, REST, XMPP, AMQP;

  • Persistence plug-in and security plug-in: ActiveMQ provides Multiple persistence options. Moreover, the security of ActiveMQ can also be fully customized for authentication and authorization based on user needs;

  • supports many types of client languages: in addition to Java, there are also: C/ C, .NET, Perl, PHP, Python, Ruby;

  • Agent cluster: Multiple ActiveMQ brokers can form a cluster to provide services;

  • Exceptionally simple management: ActiveMQ is designed with developers in mind. Therefore, it does not require a dedicated administrator as it provides simple and easy-to-use management features. There are many ways to monitor data at different levels of ActiveMQ, including using JMX in JConsole or ActiveMQ's Web Console, by processing JMX alarm messages, by using command line scripts, You can even monitor various types of logs.

3 RocketMQ

RocketMQ is an open source product from Alibaba. It is implemented in the Java language. It referred to Kafka during the design and made some of its own Improved, message reliability is better than Kafka. RocketMQ is widely used in Alibaba Group in order, transaction, recharge, stream computing, message push, log streaming, binglog distribution and other scenarios.

  • is a queue model message middleware with high performance, high reliability, high real-time and distributed characteristics;

  • Producer, Consumer , queues can be distributed;

  • Producer sends messages to some queues in turn, and the queue collection is called Topic. If Consumer does broadcast consumption, one consumer instance consumes all queues corresponding to this Topic. , if you do cluster consumption,

  • multiple Consumer instances will consume the queue set corresponding to this topic on average;

  • can ensure strict message order. ;

  • Provide rich message pull mode;

  • Efficient subscriber horizontal expansion capability;

  • Real-time message subscription mechanism;

  • Billion-level message accumulation capability;

  • Less dependencies;

4 Kafka

Apache Kafka is a distributed message publishing and subscription system. It was originally implemented by LinkedIn as a distributed commit log system (a distributed commit log) based on a unique design, and later became part of the Apache project. Kafka systems are fast, scalable, and durable. Its partitioning characteristics, replicability and fault tolerance are all good features.

  • Fast persistence, message persistence can be performed with O(1) system overhead;

  • High throughput, on an ordinary computer The throughput rate of 10W/s can be achieved on the server;

  • . Completely distributed system, Broker, Producer, and Consumer all natively and automatically support distribution and automatically realize load balancing;

  • Supports both synchronous and asynchronous replication HA;

  • Supports batch sending and pulling of data;

  • zero-copy: Reduce IO operation steps;

  • Data migration and expansion are transparent to users;

  • The machine can be expanded without downtime;

  • Other features: strict message sequence, rich message pull model, efficient subscriber horizontal expansion, real-time message subscription, billion-level message accumulation capability, regular deletion mechanism;

The above is the detailed content of What are message queues?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn