Detailed explanation of Redis publish and subscribe function

Overview

The publish and subscribe functions provided by Redis can be used for simple message publishing and consumption scenarios. Because it is relatively simple to use and does not require separate deployment of message middleware, it is often used in some simple messaging scenarios, such as pushing Websocket real-time messages to the front end in a distributed cluster (the back-end service publishes topic messages and subscribes to the topic The back-end service determines whether it needs to be pushed to the front-end after consuming the message).

reference

Detailed explanation of Redis publish and subscribe function

Guess you like

Origin blog.csdn.net/tianzhonghaoqing/article/details/129741628