akka-actor

Akka Actor Messaging Delay

。_饼干妹妹 提交于 2019-12-24 01:40:25
问题 I'm experiencing issues scaling my app with multiple requests. Each request sends an ask to an actor, which then spawns other actors. This is fine, however, under load(5+ asks at once), the ask takes a massive amount of time to deliver the message to the target actor. The original design was to bulkhead requests evenly, but this is causing a bottleneck. Example: In this picture, the ask is sent right after the query plan resolver. However, there is a multi-second gap when the Actor receives

How to pass parameter to Scala object

对着背影说爱祢 提交于 2019-12-14 03:13:22
问题 I want to create actor only once and use its reference in the app again and again. For that I created a Scala object and everything is working fine, but when I try to use child actor I am getting NullPointerException . Here is the code: object ActorManager { val getTestActorRef: ActorRef = system.actorOf(Props[TestActor], name = "testActor") } The problem occurs when I want to instantiate a child actor. Here is code: object ActorManager { var context: ActorContext=_ val getTestActorRef: