案列
127.0.0.1:6379> SUBSCRIBE news.IT news.CCTV
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "news.IT"
3) (integer) 1
1) "subscribe"
2) "news.CCTV"
3) (integer) 2
1) "message"
2) "news.IT"
3) "redis"
1) "message"
2) "news.CCTV"
3) "xidada"
1) "message"
2) "news.IT"
3) "Nginx"
^C
127.0.0.1:6379> PUBLISH news.IT redis
(integer) 1
127.0.0.1:6379> PUBLISH news.CAR audi
(integer) 0
127.0.0.1:6379> PUBLISH news.CCTV xidada
(integer) 1