Search code examples
akka

What pattern should I use in Akka, now that Transactors are deprecated?


Since Transactors have been deprecated, which pattern should I use instead? I have the need to synchronize between different actors. I have some (dynamic) dependencies, where Actor B must not start work before Actor A has finished.


Solution

  • I have found a good solution for my specific problem. Namely, we will now use a dedicated actor that manages a queue, and each worker actor will send a message that it likes to start its work. This wish is put into the queue, and the queue actor will send out a "Go ahead" message when the queue is sufficiently advanced.

    However I'd still like to know if there is a more general concept that will replace Transactors in coming Akka releases.