Hello,

I am still evaluating ZMQ as a potentially viable infrastructure for our
ecosystem messaging concerns. And now it seems threading is the topic of
the day, or rather the lack of thread-safety. This is partly ignorance on
the subject on my part, so correct me if I am wrong, or the paradigm seems
foreign as ZMQ was intended for use.

I read that ZMQ Context is king. From what I can tell Context is
thread-safe. You can allocate new sockets and connect all day long on the
same context from different threads and you're fine, right as rain?
Context, context, context: context is king.

Sockets themselves are not thread-safe. I'll hazard to guess allocating and
using sockets in a thread is a "trivial" matter. They are intended as
disposable objects.

I am interested to design a pub/sub event brokering type system potentially
exposing ZMQ-based messaging throughout our ecosystem, inproc or IPC. If I
do that I need for my ZMQ adapters to handle context in a thread-safe
manner? Making the assumption publishers and subscribers maintain their own
sockets, etc.

Regards,

Michael Powell
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to