Redis PUBLISH 命令将消息发布到频道。
以下是Redis PUBLISH 命令的基本语法。
redis 127.0.0.1:6379> PUBLISH channel message
返回收到消息的客户端数量。
链接:https://www.learnfk.comhttps://www.learnfk.com/redis/pub-sub-publish.html
来源:LearnFk无涯教程网
redis 127.0.0.1:6379> PUBLISH mychannel "hello, i m here" (integer) 1
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)