com.rbmhtechnology.eventuate

ConfirmedDelivery

trait ConfirmedDelivery extends EventsourcedActor

Supports the reliable delivery of messages to destinations by enabling applications to redeliver messages until they are confirmed by their destinations. Both, message delivery and confirmation must be executed within an EventsourcedActor's event handler. New messages are delivered by calling deliver. When the destination replies with a confirmation message, the EventsourcedActor must generate an event for which the handler calls confirm. Until confirmation, delivered messages are tracked as unconfirmed messages. Unconfirmed messages can be redelivered by calling redeliverUnconfirmed. This is usually done within a command handler by processing scheduler messages. Redelivery occurs automatically when the EventsourcedActor successfully recovered after initial start or a re-start.

Linear Supertypes
EventsourcedActor, EventsourcedView, ActorLogging, InternalStash, StashFactory, Stash, RequiresMessageQueue[DequeBasedMessageQueueSemantics], UnrestrictedStash, StashSupport, ConditionalCommands, Actor, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ConfirmedDelivery
  2. EventsourcedActor
  3. EventsourcedView
  4. ActorLogging
  5. InternalStash
  6. StashFactory
  7. Stash
  8. RequiresMessageQueue
  9. UnrestrictedStash
  10. StashSupport
  11. ConditionalCommands
  12. Actor
  13. AnyRef
  14. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type Handler[A] = (Try[A]) ⇒ Unit

    Definition Classes
    EventsourcedView
  2. type Receive = PartialFunction[Any, Unit]

    Definition Classes
    Actor

Abstract Value Members

  1. abstract def eventLog: ActorRef

    Event log actor.

    Event log actor.

    Definition Classes
    EventsourcedView
  2. abstract def id: String

    Global unique actor id.

    Global unique actor id.

    Definition Classes
    EventsourcedView
  3. abstract def onCommand: Receive

    Command handler.

    Command handler.

    Definition Classes
    EventsourcedView
  4. abstract def onEvent: Receive

    Event handler.

    Event handler.

    Definition Classes
    EventsourcedView

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def aggregateId: Option[String]

    Optional aggregate id.

    Optional aggregate id. It is used for routing DurableEvents to event-sourced destinations which can be EventsourcedViews or EventsourcedActors. By default, an event is routed to an event-sourced destination with an undefined aggregateId. If a destination's aggregateId is defined it will only receive events with a matching aggregate id in DurableEvent#destinationAggregateIds.

    Definition Classes
    EventsourcedView
  5. def aroundPostRestart(reason: Throwable): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  6. def aroundPostStop(): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  7. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  8. def aroundPreStart(): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  9. def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def confirm(deliveryId: String): Unit

    Confirms the message delivery identified by deliveryId.

  13. implicit val context: ActorContext

    Definition Classes
    Actor
  14. final def delay[A](command: A)(handler: (A) ⇒ Unit): Unit

    Delays handling of command to that point in the future where all previously called persist or persistN operations completed.

    Delays handling of command to that point in the future where all previously called persist or persistN operations completed. Therefore, using this method only makes sense if stateSync is set to false. The handler is called during a separate message dispatch by this actor, hence, it is safe to access internal state within handler.

    Definition Classes
    EventsourcedActor
    See also

    ConditionalCommand

  15. def deliver(deliveryId: String, message: Any, destination: ActorPath): Unit

    Delivers the given message to a destination.

    Delivers the given message to a destination. The delivery of message is identified by the given deliveryId which must be unique in context of the sending actor. The message is tracked as unconfirmed message until delivery is confirmed with confirm, using the same deliveryId.

  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. val instanceId: Int

    Definition Classes
    EventsourcedView
  22. def internalStash(): Unit

    Internal API.

    Internal API.

    Definition Classes
    InternalStash
  23. def internalUnstash(): Unit

    Internal API.

    Internal API.

    Definition Classes
    InternalStash
  24. def internalUnstashAll(): Unit

    Internal API.

    Internal API.

    Definition Classes
    InternalStash
  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. final def lastEmitterAggregateId: Option[String]

    Emitter aggregate id of the last handled event.

    Emitter aggregate id of the last handled event.

    Definition Classes
    EventsourcedView
  27. final def lastEmitterId: String

    Emitter id of the last handled event.

    Emitter id of the last handled event.

    Definition Classes
    EventsourcedView
  28. final def lastSequenceNr: Long

    Sequence number of the last handled event.

    Sequence number of the last handled event.

    Definition Classes
    EventsourcedView
  29. final def lastSystemTimestamp: Long

    Wall-clock timestamp of the last handled event.

    Wall-clock timestamp of the last handled event.

    Definition Classes
    EventsourcedView
  30. final def lastVectorTimestamp: VectorTime

    Vector timestamp of the last handled event.

    Vector timestamp of the last handled event.

    Definition Classes
    EventsourcedView
  31. def load(): Unit

    Sends a LoadSnapshot command to the event log.

    Sends a LoadSnapshot command to the event log. Can be overridden by implementations to customize snapshot loading.

    Definition Classes
    EventsourcedView
  32. def log: LoggingAdapter

    Definition Classes
    ActorLogging
  33. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  34. final def notify(): Unit

    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  36. def onRecovered(): Unit

    Called after recovery successfully completed.

    Called after recovery successfully completed. Can be overridden by implementations.

    Definition Classes
    EventsourcedView
  37. def onSnapshot: Receive

    Snapshot handler.

    Snapshot handler.

    Definition Classes
    EventsourcedView
  38. final def persist[A](event: A, customDestinationAggregateIds: Set[String] = Set())(handler: Handler[A]): Unit

    Asynchronously persists the given event and calls handler with the persist result.

    Asynchronously persists the given event and calls handler with the persist result. The handler is called during a separate message dispatch by this actor, hence, it is safe to modify internal state within handler. The handler can also obtain a reference to the initial command sender via sender().

    By default, the event is routed to event-sourced destinations with an undefined aggregateId. If this actor's aggregateId is defined it is additionally routed to all actors with the same aggregateId. Further routing destinations can be defined with the customDestinationAggregateIds parameter.

    Definition Classes
    EventsourcedActor
  39. final def persistN[A](events: Seq[A], onLast: Handler[A] = (_: Try[A]) => (), customDestinationAggregateIds: Set[String] = Set())(handler: Handler[A]): Unit

    Asynchronously persists a sequence of events and calls handler with the persist results.

    Asynchronously persists a sequence of events and calls handler with the persist results. The handler is called for each event in the sequence during a separate message dispatch by this actor, hence, it is safe to modify internal state within handler. The handler can also obtain a reference to the initial command sender via sender(). The onLast handler is additionally called for the last event in the sequence.

    By default, the event is routed to event-sourced destinations with an undefined aggregateId. If this actor's aggregateId is defined it is additionally routed to all actors with the same aggregateId. Further routing destinations can be defined with the customDestinationAggregateIds parameter.

    Definition Classes
    EventsourcedActor
  40. final def persistWithLocalTime[A](f: (Long) ⇒ A, customDestinationAggregateIds: Set[String] = Set())(handler: Handler[A]): A

    Asynchronously persists the event returned by f and calls handler with the persist result.

    Asynchronously persists the event returned by f and calls handler with the persist result. The input parameter to f is the current local time which is the actor's logical time, taken from its internal vector clock, and not the current system time. The handler is called during a separate message dispatch by this actor, hence, it is safe to modify internal state within handler. The handler can also obtain a reference to the initial command sender via sender().

    By default, the event is routed to event-sourced destinations with an undefined aggregateId. If this actor's aggregateId is defined it is additionally routed to all actors with the same aggregateId. Further routing destinations can be defined with the customDestinationAggregateIds parameter.

    Definition Classes
    EventsourcedActor
  41. def postRestart(reason: Throwable): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  42. def postStop(): Unit

    Definition Classes
    InternalStash → UnrestrictedStash → Actor
  43. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Definition Classes
    InternalStash → UnrestrictedStash → Actor
  44. def preStart(): Unit

    Initiates recovery by calling load.

    Initiates recovery by calling load.

    Definition Classes
    EventsourcedActorEventsourcedView → Actor
  45. final def receive: Receive

    Initialization behavior.

    Initialization behavior.

    Definition Classes
    EventsourcedView → Actor
  46. final def recovering: Boolean

    Returns true if this actor is currently recovering internal state by consuming replayed events from the event log.

    Returns true if this actor is currently recovering internal state by consuming replayed events from the event log. Returns false after recovery completed and the actor switches to consuming live events.

    Definition Classes
    EventsourcedView
  47. def redeliverUnconfirmed(): Unit

    Redelivers all unconfirmed messages.

  48. def replay(fromSequenceNr: Long = 1L): Unit

    Sends a Replay command to the event log.

    Sends a Replay command to the event log. Can be overridden by implementations to customize replay.

    Definition Classes
    EventsourcedView
  49. def save(snapshot: Any)(handler: Handler[SnapshotMetadata]): Unit

    Asynchronously saves the given snapshot and calls handler with the generated snapshot metadata.

    Asynchronously saves the given snapshot and calls handler with the generated snapshot metadata. The handler can also obtain a reference to the initial message sender via sender().

    Definition Classes
    EventsourcedView
  50. implicit final val self: ActorRef

    Definition Classes
    Actor
  51. final def sender(): ActorRef

    Definition Classes
    Actor
  52. def stash(): Unit

    Definition Classes
    StashSupport
  53. def stateSync: Boolean

    State synchronization.

    State synchronization. If set to true, commands see internal state that is consistent with the event log. This is achieved by stashing new commands if this actor is currently writing events.

    If set to false, commands see internal state that might be stale. To see state updates from any previously persisted events, applications can delay these commands. In this mode, commands are not stashed and events can be batched for write which significantly increases write throughput.

    Definition Classes
    EventsourcedActor
  54. def supervisorStrategy: SupervisorStrategy

    Definition Classes
    Actor
  55. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  56. def toString(): String

    Definition Classes
    AnyRef → Any
  57. def unconfirmed: Set[String]

    Delivery ids of unconfirmed messages.

  58. def unhandled(message: Any): Unit

    Definition Classes
    Actor
  59. def unstashAll(): Unit

    Definition Classes
    StashSupport
  60. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from EventsourcedActor

Inherited from EventsourcedView

Inherited from ActorLogging

Inherited from InternalStash

Inherited from StashFactory

Inherited from Stash

Inherited from RequiresMessageQueue[DequeBasedMessageQueueSemantics]

Inherited from UnrestrictedStash

Inherited from StashSupport

Inherited from ConditionalCommands

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped