Say I have a publisher_socket and a subscriber_socket, created in two different processes. The publisher_socket publishes a two-part message, outlined in pseudo-code below.
publisher_socket.send("huge_blob", ZMQ_SNDMORE)
publisher_socket.send([ 1GB buffer of data ])
Suppose thesubscriber_socket is not set up its message filter to subscribe to the topic "huge_blob". Does the associated background thread know to skip ingestion of the second part of the message? Or might I see the subscriber's memory usage shoot up to 1GB as the background thread copies the second part of the message from the network, even though it will never be used?
from
zeromqv3 onwards all subscriptions are filtered on the publisher side. When you subscribe on yourZMQ_SUBsocket, the filter information is sent to theZMQ_PUBsocket and filtered there.So the answer is no, you
ZMQ_SUBprocess, socket, network etc will not see the first or second frame if they are not subscribed to "huge_blob"