Is it common to stop child actors in event sourcing?

When using it in combination with Cluster Sharding (like explained in the guide), the entities will be passivated after 2 minutes (by default).

We have recently released a new version of Akka that includes different passivation strategies. Checkout out this section in our docs: Cluster Sharding • Akka Documentation

You can also ask the actor to stop after processing a given message by calling thenStop on the Effect.

Using child actors is not recommended with event sourcing because you can’t have transaction between two actors and therefore you don’t get the transaction boundary and consistency that an aggregate requires.

1 Like