This is a simple example application which has:
- a Client Actor which just sends one message to the Supervisor actor
- a Supervisor which just responds to the Client actor and starts watching it
When the Client actor dies, the Supervisor actor prints a message onto the standard output.
Build the code
$ sbt compile
In a separate terminal, run the Supervisor
$ sbt 'runMain actors.Supervisor'
In a separate terminal, run the Client
$ sbt 'runMain actors.Client'
Press Ctrl-C after the Client starts and prints the message that comes from the Supervisor.
Go to the Supervisor terminal and observe the arrival of the Terminated message.