• redis 发布和订阅


    发布和订阅

    发布

    publish channel message
    例如:
    publish news “todays news”
    
    127.0.0.1:6379> publish news "today is sunshine"
    (integer) 0
    127.0.0.1:6379> publish news "today is sunshine1"
    (integer) 1
    127.0.0.1:6379> publish yes "yes yes yes"
    (integer) 0
    127.0.0.1:6379> publish news "today is sunshine1 yes"
    (integer) 2
    127.0.0.1:6379> publish news "today is sunshine1 yes 2"
    (integer) 3
    127.0.0.1:6379> publish yes "today is sunshine1 yes 2"
    (integer) 1
    127.0.0.1:6379> publish yes "today is sunshine1 yes 23"
    (integer) 1
    

    订阅

    subscribe channel
    例如:
    subscribe news
    
    127.0.0.1:6379> subscribe news
    
  • 相关阅读:
    基于JavaMail开发邮件发送器工具类
    微服务架构
    图像识别
    Manacher
    左偏树
    虚树
    动态树(Link-Cut Tree)
    Splay
    扩展中国剩余定理(EXCRT)
    K-D树
  • 原文地址:https://www.cnblogs.com/sha-ka/p/12779539.html
Copyright © 2020-2023  润新知