redis broadcast / subscription model demonstration

Reference blog

http://www.pianshen.com/article/7183315879/

 

  1. First start a local service redis

2. Start 4 client redis-cli

3. Three of the client monitor channel test set

subscribe test

 

4. The fourth client as a message released by the client, send messages to the channel test

We can see the other three clients received the message

 

Guess you like

Origin www.cnblogs.com/yun965861480/p/10983841.html