Description
In the current implementation, it appears that messages scheduled for retry by the broker may be lost if the broker is not running at the time the job is scheduled to execute. If, for example, a message fails and is scheduled for retry at 1:30, with a 5 minute delay, the job will be scheduled to execute at 1:35. If the broker is running at 1:35, whether continuously or after a restart, the job will execute as expected and the message will arrive at the specified target destination. However, if the broker is shutdown before the scheduled time and then started again after that time, say at 1:40, the message appears to be discarded and is not sent. The same behavior appears to apply as well to messages sent originally with a delay.
This may result in loss of a message that needed to be processed. While there may be scenarios where precise execution time of a job is critical (i.e. a job scheduled for 1:35 should not run at any time other than 1:35), it is also possible, and in the case of retries probably likely, that the job should execute regardless. Message loss is generally "bad" and it would likely be preferable that the retried message be sent at the scheduled time or the next available opportunity in the case of a broker that is not running at the scheduled time.