Hi, I’m using both ClusterSharding and EventSourcedBehavior.
I think EventSourcedBehavior supports graceful shutdown by waiting persisting & processing stashed commands before stop. Right?
ClusterSharding also send PoisonPill(by default) to Entity on rebalancing entities.
The unfortunate thing is we don’t use EventSourcedBehavior under ClusterSharding directly.
We shard actor X, and create persistent actor Y under X.
What I want:
- Cluster shard sends stop message to X (I know it’s possible since stop message can be configured)
- X sends stop message to Y (Difficult part: because I cannot send PoisonPill)
- X turns into waiting state
- When Y stops, X also stops.
How can I implement it?