1

I'm using ZeroMQ (ZMQ) to transfer bulk data from a server to multiple groups. The bulk data is divided into small chunks and transmitted accordingly. After sending a predefined window of data, I perform a check for packet loss. If no loss is detected, I proceed to the next window. However, if packet loss is detected, I need to resend the missing packets.

The issue arises when I attempt to resend the missed packets—the client doesn't receive them on the first attempt. To address this, I've implemented a process with 6 to 10 retries, each with an exponential backoff delay. Eventually, the client receives all the missed packets. I suspect that the internal buffer in ZMQ may be overflowing, causing the dropped packets due to a full buffer.

To mitigate this, I would like to clear the internal buffer of the ZMQ multicast without closing the socket. How can I achieve this in ZMQ? Any guidance or code snippets would be greatly appreciated.

I would like to clear the internal buffer of the ZMQ multicast without closing the socket

3
  • what socket pattern are you using (pub/sub or radio/dish)? Also are you using straight multicast or epgm? There is no way to clear the buffer without closing the socket but you could try increasing the SNDHWM on the sender and RCVHWM on the receivers Commented Feb 29, 2024 at 10:35
  • Hi @jamesdillonharvey thanks for your reply, I'm using Pub-Sub pattern with Epgm multicast. Could please tell me the clear definition or meaning for SNDHWM and RCVHWM Commented Mar 1, 2024 at 4:17
  • for example using cppzmq library the call would be my_send_socket.set(zmq::sockopt::sndhwm,100000) Commented Mar 4, 2024 at 17:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.