java - How do I monitor all Terminated messages in akka? -


i want create actor subscribes terminated messages actors created in system. how do that?

i have tried below - not seem work,

getcontext().system().eventstream().subscribe(getself(), terminated.class); 

and avoid below - because need each actor want monitor.,

getcontext().watch(subject); 

a similar (but bit less hacky) way solve implement publish/subscribe pattern (as described here in scala instance)

then have actor subscribe specific event (such "terminated") that:

eventstream.subscribe(foo.onevent, "terminated") 

Comments

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

clojure - 'get' replacement that throws exception on not found? -