[zeromq-dev] Basic questions on ZeroMQ functionality

Min miniway at gmail.com
Thu Jan 10 15:12:11 CET 2013


Comments are under the questions.


2013년 1월 10일 목요일에 shyam valsan님이 작성:

> I have few basic questions on ZeroMQ functionality
> -          What is the maximum buffer size for zeroMQ receive socket
> (ZMQ_SUB). Wanted to know how many messages can be queued up on the receive
> socket.
> You can control the buffer size by setting send/recv hwm configuration.
1000 is default for 3.x. And unlimited for 2.x

> -          What is the max length of messages that can be send on the
> socket using zmq_send(). If the length exceeds the limit, will it be
> handled internally by zeroMQ as two different message or will the message
> get truncated?
> If your memory allows, ZMQ can send 2^64 bytes as a single frame. A
message would not be truncated. But it is not a good practice. You should
split into multiple messages for example sending a large file. FileMQ is
a good example.

>                 After I have opened a socket for listening [ i.e after
> successful calls to zmq_connect and zmq_setsockopt() with ZMQ_SUBSCRIBE
> option],all messages  being send on that port (where subscribe socket is
> listening) will be received by the subscribe socket and queued up in its
> receive queue. Once zmq_receive() call is made all these messages will be
> received by application. Is understanding correct.
Messages are being sent with the best effort until both sender's and
receiver's queue are full.

> Thanks,
> Shyam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130110/cb05383b/attachment.htm>

More information about the zeromq-dev mailing list