Route racing sends the same message on several routes at once and uses the first copy to arrive. An idempotency key is an identifier the sender attaches to every copy of one message (for orders, the client order identifier) so that the receiver can recognise the copies and act on only one.
fig_race.py, nw_race.race_rows().