I am using akka streams. So i am having one actor with this functionality.
Both messages were getting processed in order sometimes . but due to async call (I THINK) , i am getting dead letter in this.
actor.tell(message,ActorRef.noSender());
actor.tell(PoisonPill.getInstance(),ActorRef.noSender())
Can anyone help how to make sure to run this code in specific order?