[zeromq-dev] zmq proxy with INPROC as frontend and TCP as backend: is it feasible?

Stephen Riesenberg stephen.riesenberg at gmail.com
Thu Mar 30 21:56:03 CEST 2017


Francesco,

Have you read the ZeroMQ guide? Seems like a perfect fit. You are basically
building a single publisher that funnels messages through like a broker,
except the broker is local to the threads emitting messages. I've used this
pattern in the past. You can then treat that broker as a single endpoint to
the outside world, and connect or bind the xpub socket based on your use
case.

Though I'm not sure what you mean by "I would like to have all these thread
appear as a unique endpoint to the outside world." Would this be through a
topic name or some other piece of data? This also seems fine, but wasn't
sure if that's what you meant.

On Tue, Mar 28, 2017 at 7:39 AM Francesco <francesco.montorsi at gmail.com>
wrote:

> Hi all,
>
> I'm trying to work out a problem in a multithreaded application and I
> would like to use ZMQ to solve it.
>
> In particular I have a process with several threads that are
> generating messages; each one has its own PUB socket.
> I would like to have all these thread appear as a unique endpoint to
> the outside world.
>
> For this reason I'm thinking of changing the PUB socket of each thread
> to use the INPROC transport and then create a ZMQ proxy exposing an
> XSUB frontend socket with INPROC transport and an XPUB backend socket
> with TCP transport, for the external world.
>
> Do you think such kind of scenario would work?
>
> Thanks!
> Francesco
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170330/601572a8/attachment.htm>


More information about the zeromq-dev mailing list