擅长:python、mysql、java
<p>如果(<a href="http://api.zeromq.org/3-1%3azmq-pgm" rel="nofollow">and only if</a>)使用ZMQ_PUB或ZMQ_SUB sockets(在您给出的示例中没有这样做,在这里您使用路由器、XREQ等),则可以使用UDP,或者更准确地说,通过</p>
<blockquote>
<p>"epgm://host:port"</p>
</blockquote>
<p>e PGM代表封装在UDP中的<code>Encapsulated PGM</code>,即<a href="http://en.wikipedia.org/wiki/Pragmatic_General_Multicast" rel="nofollow" title="PGM">PGM</a>,它比原始PGM更兼容现有的网络基础设施。</p>
<p>另见<a href="http://api.zeromq.org/2-1:zmq-pgm" rel="nofollow">http://api.zeromq.org/2-1:zmq-pgm</a></p>
<p>不过,我不知道UDP是否支持单播场景。</p>