Reputation: 511
It appears that ZeroMQ will aggregate data on the server side when using the pgm and epgm protocols and send multiple updates in the same multicast packet. For example, if I call zmq_msg_send 10,000 times and look at the data that I am sending out in tcpdump I can see that I send out less than 10,000 distinct messages. Is this expected? Is there a way to configure ZeroMQ to not do this?
Upvotes: 1
Views: 416
Reputation: 6418
Yes, it's expected behavior. A quote from ZeroMQ FAQ (http://www.zeromq.org/area:faq):
ØMQ batches messages in opportunistic manner. Rather than waiting for a predefined number of messages and/or predefined time interval, it sends all the messages available at the moment in one go. Imagine the network interface card is busy sending data. Once it is ready to send more data it asks ØMQ for new messages. ØMQ sends all the messages available at the moment. Does it harm the latency of the first message in the batch? No. The message won't be sent earlier anyway because the networking card was busy. On the contrary, latency of subsequent messages will be improved because sending single batch to the card is faster then sending lot of small messages. On the other hand, if network card isn't busy, the message is sent straight away without waiting for following messages. Thus it'll have the best possible latency.
There's no way to configure this. And there's no reason to, since ZeroMQ batches don't increase latencies.
Upvotes: 1