Hello all assuming that we have a pub-sub pattern in zmq with many subscribers, one publisher, and a message of 3GB. My question is does the publisher send n x O(m) where n is the number of subscribers and m is the 3GB size or does it only uploads once the 3 GB and somehow the subscriber download it? so to avoid the n x O(m).
According to zmq docs pub-sub is a multicast pattern
"ZeroMQ’s low-level patterns have their different characters. Pub-sub addresses an old messaging problem, which is multicast or group messaging"
so i expect not n x O(m) but just O(m) am i correct?
In general you only send once through the pub socket and it gets send to all subscribers.
See docs here: https://zeromq.org/socket-api/#publish-subscribe-pattern
PUB socket
A PUB socket is used by a publisher to distribute data. Messages sent are distributed in a fan out fashion to all connected peers. This socket type is not able to receive any messages.
When a PUB socket enters the mute state due to having reached the high water mark for a subscriber, then any messages that would be sent to the subscriber in question shall instead be dropped until the mute state ends. The send function does never block for this socket type.