by Doman · 6y ago · 0 comments
Maybe there is no guarantee, but it can handle unreliable connection just fine, at least when I used it a few years ago.
Pseudocode:
Send msg to server
if socket timeout:
reinit socket and send again
Recv from server
if recv.msg != 'ok':
send again
else
remove msg from storage
One message has from few to few hundreds Kilobytes. Messages are stored and sent as custom binary data for better compression (better that protobuffs).
ZMQ takes complexity of raw tcp sockets away and this is what we needed it for. As much and as little.