[zeromq-dev] xpub and xsub example

Mohit Jaggi mohitjaggi at gmail.com
Mon Jan 14 23:39:37 CET 2013

Thanks Charles(new to IRC, thanks for the advice!) and Peter. The example
you pointed out does use XPUB/XSUB. Am I missing something?

On Mon, Jan 14, 2013 at 2:25 PM, Charles Remes <lists at chuckremes.com> wrote:

> On Jan 14, 2013, at 4:10 PM, Mohit Jaggi <mohitjaggi at gmail.com> wrote:
> Hi All,
> I am looking for examples of xpub and xsub. My use case is that multiple
> threads in a process produce data that needs to be published over a TCP
> socket. I was thinking of letting them call "send" but it seems that that
> is not thread-safe. From the guide, it appears I can use inproc+xpub socket
> from producers to a proxy and let subscribers connect over TCP/xsub.
> However, there is no example code.
> I answered your question on irc. When asking a question, you should stick
> around for more than 5m to get an answer.
> Create a forwarder device that all of your PUB sockets connect to. All SUB
> sockets should then subscribe to that forwarder. You do *not* need to mess
> with XPUB and XSUB sockets.
> See here:
> http://api.zeromq.org/3-2:zmq-proxy
> and
> http://zguide.zeromq.org/page:all#Intermediaries-and-Proxies
> cr
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130114/b76ffafe/attachment.htm>

More information about the zeromq-dev mailing list