akka/akka — pull request #15599 by ktoso (2014-07-29 16:25:35+00:00)
Title: =per #15590 Increase efforts to in-order on start of ALOD

AtLeastOnceDelivery can delivery out-of-order, and that's OK.
Although, in the case of message replay followed by taking user land
commands which may trigger `deliver` calls, it is nicer to at least once
try to send the replayed but not confirmed deliveries *first*, before
sending the completely new deliveries.

This change acomplishes this by keeping a counter (incremented during
replay) that stores the number of "pending deliveries, from replay".
After sending this number of messages, the usual mechanisms apply again.

- TODO: Stare at the code a bit more, got a bit late today;

Resolves #15590