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