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?
I finally played with
Source.Lazily()with my source. It's working, it's not evaluated before the initial delay call. But I'm listening for any other ideas