the maximum number of events (messages) to be buffered
the interval for heartbeats; if Undefined, which is the default, no heartbeats are published
To be invoked when an event is received.
To be invoked when an event is received.
Receive events via onEvent and ActorPublisherMessages.
Receive events via onEvent and ActorPublisherMessages.
Base class for an actor publishing events.
Concrete subclasses must implement receiveEvent which becomes part of the initial behavior, i.e. gets called by the provided receive implementation. Typically
receiveEventwould be implemented simply be invoking onEvent which fist appends the received event (message) to the buffer which is limited by thebufferSizeparameter and then publishes the buffered events up to the total demand if this publisher is active.ActorPublisherMessage.Requestis handled by publishing the buffered events up to the requested demand and otherActorPublisherMessages (e.g.Cancel) stop this actor.If the
heartbeatIntervalis defined, a ServerSentEvent.heartbeat will be published if no other event has been received within that interval.Attention: An implicit view
A => ServerSentEventhas to be in scope!