Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class AccountActor extends Actor {
def receive = initializing
def initializing: Receive = {
case account: AccountDetails =>
context.become(active(account))
}
def active(account: AccountDetails): Receive = {
case update: AccountDetails =>
logger.info("Account details have been updated")
context.become(active(account))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment