How would you replay a web service request every ten seconds for ten times until it answers?
I've tried RecoverWithRetries
and InitialDelay
, but the first recovery immediately replays the web service call:
FromThirdOfContract().RecoverWithRetries(e =>
{
return Source.FromTask(_third.GetThird(message.ContractIdLegacy)).InitialDelay(TimeSpan.FromSeconds(secondsbetween));
}, retry);
The first retry happens immediately instead of ten seconds later. In Akka, there's a RestartSource
class; we don't have it in Akka.NET. Any ideas?