How get redundancy for forwarder in ZMQ PUB/SUB?

坚强是说给别人听的谎言 提交于 2019-12-11 07:53:18

问题


I tried and made run this example. It worked very well.

I can add as many publishers or subscribers as I want, everything will communicate thanks to the forwarder. My concern is about redundancy. If the forwarder does not respond anymore, nothing's gonna work until forwarder is up.

I found an example for REQ/REP, but it can't be applied for PUB/SUB as subscribers. But idea is here.

Is there a way to have something similar in a pub/sub scenario?

Thank you.


回答1:


First read this chapter.

In the beginning of it it states that these reliability patterns don't apply to PUB-SUB patterns due to its broadcast nature. So you can either put in a out of band control/ack/ping path that you use to see if everything went ok, or you can use a REQ/ROUTER/REP pattern that supports these reliability tests.



来源:https://stackoverflow.com/questions/18345387/how-get-redundancy-for-forwarder-in-zmq-pub-sub

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!