Suppose that several machines are interacting together using python's
zeroMQ client.
These messages are naturally formatted as strings.
Is there a limit to the length of a message (string)?
Suppose that several machines are interacting together using python's
zeroMQ client.
These messages are naturally formatted as strings.
Is there a limit to the length of a message (string)?
There is no limit to the size of messages being sent however small messages are handled differently than large messages (see here).
The max size of a small messages is defined in the source code at 30 bytes (see here, look for ZMQ_MAX_VSM_SIZE).
There is the socket option ZMQ_MAXMSGSIZE which causes a peer sending an oversized message to be disconnected, but the default is "no limit".
but the default is "no limit"
does answer the question! IMHO this here is currently the most helpful answer (if you do not look in the comments of the accepted answer). –
Pendleton No limit
As for small size messages transmitted within zmq_msg_t structures, their limit is 29 bytes (for zmq version 3.2.2)
"max_vsm_size = 29," quoted from https://github.com/zeromq/libzmq/blob/master/src/msg.hpp
Some socket types support up to 2^64, but some less than 2^31.
You should build a protocol that keeps chunks below that size anyway, but this is the real answer.
© 2022 - 2024 — McMap. All rights reserved.