Well, yeah -- that's how Sharding works, and how it is *supposed* to work. If you send a message to a sharded ID, it will start an entity with that ID. Passivate and the like are intended, as the name implies, to *passivate* the Actor -- to turn it off temporarily while it's not doing anything useful. Normal use of Cluster Sharding is to use Passivate to temporarily release resources, but for the Actor to spring back to life again as soon as it is referenced. That's basically the point of Sharding.
Seriously, it sounds like you're trying to do something that's deeply against the normal design of Cluster Sharding. If you really need to permanently kill this entity, the only way I see to do that is to record an "I Am Dead" message in persistence, and when the Actor receives a message, it hits that message and kills itself again. Yes, that's a bit inefficient, but I'm not sure how else it could work -- you're presuming magic central knowledge that a particular Entity is "permanently dead", and that's not a concept that exists in Cluster Sharding. If you want to smash an entity flat permanently, such that it will refuse further communication, you have to implement that yourself... On Tue, Jun 6, 2017 at 11:04 AM, Yee-Ning Cheng <yee.ni...@gmail.com> wrote: > I currently have an actor that extends PersistentActor and is created > using cluster sharding as a single entity part of a shard. After a certain > amount of time, I want to be able to explicity kill/stop a single entity > actor permanently. I have tried using Passivate, explicitly sending a > PoisonPill and context.stop() on the entity actor as self but none of it > seems to work. I am still sending messages to the shard region with the > same entity id at the time, but they essentially should be ignored but the > messages seem to restart the actor. > > -- > >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. > To post to this group, send email to akka-user@googlegroups.com. > Visit this group at https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.