-
Hi, does request response have guaranteed message ordering when sending two requests from the same peer? Ideally, if I run this code: swarm.behaviour_mut().req_resp.send_request(peer_id, Req::One);
swarm.behaviour_mut().req_resp.send_request(peer_id, Req::Two); The peer receiving the messages would always handle them in the same order, where |
Beta Was this translation helpful? Give feedback.
Answered by
elenaf9
Mar 12, 2025
Replies: 1 comment 3 replies
-
Generally, the request-response behavior handles requests in FIFO order. But the actual order in which the requests are send and received also depends on the underlying connection, mainly:
Does that help? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another, quite simple solution would be to just wait on the sender side after sending
AppendEvents
until you received the response, before sending the other requests. That guarantees that the remote has received and processed the event.