[zeromq-dev] zmq2 vs zmq1 features questions

Pavel Gushcha pavimus at gmail.com
Tue Dec 22 11:38:00 CET 2009


1. My application is multithreaded. About what i must care? I only must
specify required app_threads in zmq_init and protect operations with context
by mutex?

2. Is there something like back protocol watermarks in zmq1?

3. In zmq1 we can receive messages in one receive() call from many queues,
and receive() returns queue identifier. In zmq2 we have two possibilities:
a) create one socket and connect it to all message sources. Now we may use
recv() for waiting for any message from any source. But after receiving we
can't determine from which source message is received.
b) create many sockets and connect them to message sources. Now each socket
is connected to one message source, and there is no problem with determining
message source. But we can't make one blocking recv() for waiting any
message from any source.
In other words, i need use one blocking recv() for waiting message from any
source and i must determine message source. Moreover, in some cases i need
disabling/enabling receiving messages from some sources (like consume() in
zmq1)

If now there is no such functionaly how is the better way to build it? may
be sockets bind() and connect() should return something like identifier, and
recv() will return this identifier?

4. Is something like
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20091222/77d49f8d/attachment.htm>


More information about the zeromq-dev mailing list