Joke Collection Website - Blessing messages - How does redis make a message queue?

How does redis make a message queue?

Message Queuing of SMS Based on Redis

1.Redis implements the principle of message queuing. Commonly used message queues are RabbitMQ and ActiveMQ. Personally, I think this message queue is too big and heavy. This paper introduces a lightweight message queuing service based on Redis. Generally speaking, message queuing has two modes, one is publisher subscription mode, and the other is producer and consumer mode. Redis's message queue is also based on these two principles. Publisher and Subscriber mode: The publisher sends messages to the queue, and each subscriber can receive the same message. Producer and consumer mode: the producer puts the message in the queue and multiple consumers listen together. Whoever gets the resources first will take the message out of the queue for processing. Please note that each message can only be received by one consumer at most.