Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common message queues in the database

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

In this article, the editor introduces in detail "what are the common message queues in the database", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "what are the common message queues in the database" can help you solve your doubts? let's follow the editor's ideas to learn new knowledge.

What is a message queue?

Message queuing is a container that stores messages during the transmission of messages, which is used to receive messages and store them as files. Messages in one queue can be consumed by multiple message consumers at the same time. Distributed message service DMS is a distributed queuing system in which messages are distributed and stored in message queues, and multiple copies of each message are stored for high availability, as shown in the following figure.

In general, message queuing has the following properties:

Message order

Ordinary queues support "partition ordered" and "global queue" modes. Both ActiveMQ queues and Kafka queues are partition ordered.

Partitioned and orderly queues support higher concurrency through distributed processing, but because of the distributed nature of queues, DMS cannot guarantee that they can be consumed in the exact order in which messages are received. If the user requires that the order be maintained, it is recommended that you place sort information in each message to reorder the message when it is received.

Globally ordered queues follow the first-in-first-out rule (FIFO) for message consumption, which is suitable for scenarios with high consumption order.

Pass at least once

In rare cases, when a user receives or deletes a message, one of the servers that store copies of the message may not be available. If this occurs, the copy of the message on the unavailable server will not be deleted, and a copy of the message may be obtained again when the message is received.

This is called "at least one delivery", so the user's application should be designed to be idempotent (that is, if the application processes the same message multiple times, it should not be adversely affected).

When there are fewer messages, a single consumption cannot get a specified number of messages.

When consuming messages from a message queue, DMS reads messages from part of the message storage partition and returns messages to the consumer each time. If the number of messages in the queue is relatively small, the number of messages consumed at a single time may be less than the specified number, but multiple consumption will eventually get all the messages.

Introduction to common message queues:

Ordinary queue

Ordinary queues with ordered partitions and global order have higher concurrency performance, and do not guarantee strict first-in, first-out (FIFO) order, while globally ordered ordinary queues guarantee strict first-in, first-out (FIFO) order of messages. DMS supports normal queues and ordered queues, and provides message middleware services with high concurrency, low latency, stability and security.

ActiveMQ queue

Queues that use the AMQP protocol. Advanced Message Queuing Protocol, an advanced message queuing protocol of the application layer standard of unified message service, is an open standard of the application layer protocol, and is designed for message-oriented middleware. DMS is compatible with ActiveMQ, easy to use, on demand, supports horizontal expansion, safe and reliable, worry-free operation and maintenance.

Kafka queue

Support the use of open source kafka clients for production and consumption of messages. High throughput mode and high reliability mode are supported. Message replicas in high throughput mode are dropped asynchronously, with high performance, and multiple copies of messages in high reliable mode are synchronously dropped to ensure the reliability of messages. DMS is compatible with Kafka, ready to use, safe and reliable, and supports two application scenarios: high throughput and high reliability.

RabbitMQ queue

It is deployed in physical isolation, and users can customize memory specifications and custom features. You can customize RabbitMQ instances of computing capacity and storage space according to your business needs. DMS is compatible with RabbitMQ and provides exclusive resources to ensure high queue performance.

After reading this, the article "what are the common message queues in the database" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it before you can understand it. If you want to know more about related articles, welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report