我过去常常在绑定中设置我的演员系统,如下所示:
implicit val System: ActorSystem = ActorSystem()
implicit val Mat: Materializer = ActorMaterializer(ActorMaterializerSettings.create(System).withSupervisionStrategy(Decider))但是在新版本中,ActorMaterializer.apply/.create/.withSupervisionStrategy是不可取的:
@deprecated(
"Use the system wide materializer or Materializer.apply(actorContext) with stream attributes or configuration settings to change defaults",
"2.6.0")
@deprecated(
"Use the system wide materializer or Materializer.create(actorContext) with stream attributes or configuration settings to change defaults",
"2.6.0")
@deprecated("Use attribute 'ActorAttributes.supervisionStrategy' to change setting value", "2.6.0")我不知道我的两行系统应该改变什么.
发布于 2020-11-17 11:52:48
均衡器容易,监管策略需要更多的改变。
decider作为流的属性,例如:
来源..。.withAttributes(ActorAttributes.supervisionStrategy(decider)) .via(flow) .toMat(接收器)https://stackoverflow.com/questions/64872825
复制相似问题