search

Home  >  Q&A  >  body text

redis的发布订阅就是一种消息队列么

一直对消息队列的概念很模糊,目前理解消息队列是异步实现需求的方法。
这就产生了一个疑问:一般的消息队列,取消息是客户端主动去取么?还是队列主动推送给客户端?如果是客户端主动取,那取消息的线程就需要一直等待么?
redis的发布订阅意思是不是就是发布者发布消息后订阅者能马上得到?可以看做一种消息队列的实现?

高洛峰高洛峰2796 days ago662

reply all(1)I'll reply

  • 阿神

    阿神2017-04-24 09:12:25

    I have used a message queue server gearman
    His mechanism is:
    1. The queue provides monitoring services and supports clients to add message queues, similar to the concept of functions
    2. The queue sub-function provides queue services
    3. The queue actively requests the client to execute the corresponding function queue work process

    reply
    0
  • Cancelreply