If you use the send/receive
primitives of the language the receiving process can choose in which order (to some degree) to process the messages in the mail box.
I explained it more here: Message Prioritization inside GenServer - #2 by cmkarlsson
However the GenServer
OTP behaviour does not allow selective receive which means the message will be processed in the same order as they are received.