Is passing around ActorRef to other Actors good or bad ?

前端 未结 2 1434

I\'m trying to figure out if my usage of passing Akka ActorRef around to other actors is not an anti-pattern.

I\'ve a few actors in my system. Some are long

2条回答
  •  孤城傲影
    2021-02-04 00:30

    It is perfectly valid, as stated in the Akka API documentation:

    ActorRefs can be freely shared among actors by message passing.

    In your case, you are passing them to the constructors, which is absolutely fine and the way it is supposed to be.

提交回复
热议问题