Question

Is it possible to capture the stop event on a actor whether is be from PoisonPill or context.stop()? Essentially, I would like to have the actor become() a "dieing" event loop, so that I can wait for things to close, and then when things do close, call context.stop(self) that will close normally. This seems kind've cyclical, so I am open to different approaches.

I should also ask, is there a way to to override the way the parent closes it's children?

Sorry that there are two questions here.

Was it helpful?

Solution

Very simple answer to both questions: define your own message type for initiating your shutdown sequence and handle that within your actor in any way you like.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top