I know there is
cast. The difference is that call blocks the caller until a reply is made and cast returns right away not blocking the caller. However the scenario im interested in is the following.
Given two processes A and B. A send two messages A1 and A2 to B and it want to send them as fast as possible but it must also guarantee that A1 is handled before A2 by B.
Now the problem I have with this is that if I use call A must wait until A1 is processed by B, I want to use the message queue of B to send messages. And if i use cast there is no order guarantees. A2 could get processed before A1.
What is the idiomatic Elixir code for this case?