如何使用 Akkling 设置退避?

How to setup Backoff with Akkling?

当直接使用 Akka.net 时,我可以这样做:

let superProps = Backoff.OnFailure(p, "supervised", TimeSpan.FromSeconds(1.0), TimeSpan.FromMinutes(1.0), 0.2)

当我像这样使用 Akkling 定义道具时:

let p = props(actorOf2(fun a -> SomeActor.someBehavior foo bar a))

我收到错误:

The type 'Props<obj>' is not compatible with the type 'Props'

那么如何使用 Akkling 正确执行此操作?

Akkling 的 Props<> 类型有 ToProps 方法,可以将其转换为传统的 Akka.NET Props 类型。