zmq vs redis for pub-sub pattern

后端 未结 4 1234
一生所求
一生所求 2020-12-23 21:43

redis supports pub-sub
zmq also supports pub-sub via a message broker

What would be the architectural pros\\cons for choosing between them?

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-23 22:17

    ZeroMq Pros/Cons

    • Pub/sub peers can connect and disconnect independently; messages are saved to buffers based on HWM settings, automatically sent upon peer availability (store-and-forward)
    • If a peer fails, buffered messages will be lost
    • Topic subscriptions support prefix matching with pub/sub enveloping only; NEWS subscription matches NEWS* messages

    Redis Pros/Cons

    • AOF snapshotting to disk persists messages in the event redis fails
    • Pub/sub clients depend on redis for connectivity
    • Wildcard matching for selective topic subscriptions like news.* supported

提交回复
热议问题