0

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?

Jeffrey Chung
  • 19,319
  • 8
  • 34
  • 54
KitAndKat
  • 953
  • 3
  • 14
  • 29

1 Answers1

0

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

KitAndKat
  • 953
  • 3
  • 14
  • 29