We can detect duplicates, gaps and missing messages over a reliable ordered delivery medium such as Aeron by using sequences.
Creating the sequence on the sending side is as simple as:
1 2 3 4 5 6 7
On the receiver, the sequence can be interpretted :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Sequences can support verification of correct message flow between two processes. In Aeron this would be expected only if the two processes were communicating on the same channel and stream. You could use the position in a stream in place of the sequence, although this will not help in cases of a process being down or in several other expected failure scenarios. This is why the Aeron team recommend that you use your own order and gap detection techniques within an Aeron channel and stream.