Akka Reaper Pattern

来源:互联网 发布:c语言告白知乎 编辑:程序博客网 时间:2024/06/06 07:51

1. Run Across Reaper

When I read AkkaJava 2.3 documentation, section 2.9 Configuration, I found the following interesting line:

# removed from their parentsreaper-interval = 5s
I was wondering what's reaper? how it works?

2. What's Reaper
Quoted from reference [1]:

The Reaper is an Actor that is in charge of collecting dead souls. He has been told to watch over a number of Actors, waiting for them die. When he sees the last one give up its ghost he performs some action, and that action will be, in this case, to shut down the ActorSystem. Never fear the reaper.

Reference:

[1] http://letitcrash.com/post/30165507578/shutdown-patterns-in-akka-2

0 0