When shutting down an ActorSystem, I would like to shut down a
ShardRegion in three phases to ensure consistency:

1. Prevent sharded entities from receiving any new commands
2. Let the sharded entities finish their work
3. Actually shut down the ShardRegion, stopping all sharded entities and
allowing other shards to start this shard's entities

To give some context, in my case command processing involves some
interaction between sharded entities and other actors (e.g. updating an
ElasticSearch index), so step 2 involves more than just stopping the
sharded entity actor.

This looks like a common problem, but I found no API for doing step 1
without stopping sharded entity actors. In particular, sending
GracefulShutdown to the ShardRegion appears to do 1. and 3. without
allowing the application code to do 2.

Am I missing something? Any help is appreciated.

- Arno


-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to