Class EventSourcedBehaviorWithEnforcedReplies<Command,​Event,​State>


  • public abstract class EventSourcedBehaviorWithEnforcedReplies<Command,​Event,​State>
    extends EventSourcedBehavior<Command,​Event,​State>
    Implement by handling incoming commands and return an Effect() to persist or signal other effects of the command handling such as stopping the behavior or others.

    Use newCommandHandlerWithReplyBuilder() to define the command handlers.

    The command handlers are only invoked when the actor is running (i.e. not replaying). While the actor is persisting events, the incoming messages are stashed and only delivered to the handler once persisting them has completed.