o

akka.persistence.typed.scaladsl

ReplicatedEventSourcing

object ReplicatedEventSourcing

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReplicatedEventSourcing
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def commonJournalConfig[Command, Event, State](replicationId: ReplicationId, allReplicaIds: Set[ReplicaId], queryPluginId: String)(eventSourcedBehaviorFactory: () => EventSourcedBehavior[Command, Event, State]): EventSourcedBehavior[Command, Event, State]

    Initialize a replicated event sourced behavior where all entity replicas are stored in the same journal.

    Initialize a replicated event sourced behavior where all entity replicas are stored in the same journal.

    Events from each replica for the same entityId will be replicated to every copy. Care must be taken to handle events in any order as events can happen concurrently at different replicas.

    Using an replicated event sourced behavior means there is no longer the single writer guarantee.

    A different journal plugin id can be configured using withJournalPluginId after creation. Different databases can be used for each replica. The events from other replicas are read using PersistentQuery.

    allReplicaIds

    All replica ids. These need to be known to receive events from all replicas.

    queryPluginId

    A single query plugin used to read the events from other replicas. Must be the query side of your configured journal plugin.

  2. def perReplicaJournalConfig[Command, Event, State](replicationId: ReplicationId, allReplicasAndQueryPlugins: Map[ReplicaId, String])(eventSourcedBehaviorFactory: () => EventSourcedBehavior[Command, Event, State]): EventSourcedBehavior[Command, Event, State]

    Initialize a replicated event sourced behavior.

    Initialize a replicated event sourced behavior.

    Events from each replica for the same entityId will be replicated to every copy. Care must be taken to handle events in any order as events can happen concurrently at different replicas.

    Using an replicated event sourced behavior means there is no longer the single writer guarantee.

    The journal plugin id for the entity itself can be configured using withJournalPluginId after creation. A query side identifier is passed per replica allowing for separate database/journal configuration per replica. The events from other replicas are read using PersistentQuery.

    allReplicasAndQueryPlugins

    All replica ids and a query plugin per replica id. These need to be known to receive events from all replicas and configured with the query plugin for the journal that each replica uses.