[zeromq-dev] inproc: need to bind to an address before connect?

Pieter Hintjens ph at imatix.com
Sat Oct 20 04:00:57 CEST 2012


On Fri, Oct 19, 2012 at 10:15 PM, Chuck Remes <lists at chuckremes.com> wrote:

> It may be safe for inproc, but I never write code using this assumption. Any change to the transport type breaks the application because the others are all asynchronous.

The only place I use it (and it works very well there) is in thread
creation, together with PAIR sockets. In CZMQ we use this to create
"attached threads" that have a pipe back to the caller.

> This is a long-time and well-known flaw in the library. The inproc transport is different and it causes problems when part of the marketing message in zeromq says that you can start with in-process communication and effortlessly scale out just by changing a single line of code.

True. Using inproc successfully relies on doing the binds before
creating child threads, whereas other transports don't.

-Pieter



More information about the zeromq-dev mailing list