I have a PUSH/PULL
Pattern in 0MQ
(Python->C#) with just one PUSH
Socket and one PULL
Socket. As long as both are connected, no matter how long it takes for the worker to process the message, the order of the queued messages is preserved.
The problem is when the worker is disconnected for a while and then reconnects, then all the messages that were queued in this period will arrive in any random order, no matter how were they queued by the PUSH
Socket. Is there a built-in solution for this problem or should I use a more advanced pattern?
I add the code on the PULL side:
using (var receiver = new PullSocket())
{
receiver.Bind("tcp://localhost:5557");
while (true)
{
var payload = receiver.ReceiveFrameString();
log.Debug($"Payload: {payload}");
}
}