Hi mailing list,

I was wondering if anyone had some good ideas about this. Say I have an 
actor that receives data from some sensor, once an hour. I'm using Akka 
Cluster Sharding and Akka Persistence. So the message arrives, Akka will 
take care of restoring the actor state, processing the message etc. After a 
couple of minutes, the actor will be passivated.

Now it may happen that the sensor sending the data breaks, and no more 
messages are received. I would like my actor to detect this, i.e. I would 
like to implement some sort of timeout or scheduled message that activates 
the actor, so it can detect it has not received messages for a long time 
and issue some sort of alert.

I've seen/built solutions where all entity IDs where stored, or all 
persistence IDs where retrieved with PersistenceQuery, and then all actors 
would be notified and "woken up" and could check their state. That seems 
somewhat inefficient to me. Maybe people have better ideas how to achieve 
this "self-check" than in this "global" manner? 

I think there might be a way to get the currently active actors from the 
shard region via GetCurrentShardState, but that would only give me the 
currently active / in memory ids, I believe. Are the ids of passivated 
actors stored in memory somewhere, and accessible? Or any other ideas how 
to approach this in a distributed fashion?

Thanks for your help,
Lutz


-- 
>>>>>>>>>>      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.

Reply via email to