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

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -