com.lightbend.lagom.scaladsl.persistence
The tags to aggregate.
The tags to aggregate.
This must return at least one tag to aggregate. Read side processors will be sharded over the cluster by these tags, so if events are tagged by a shard key, the read side processing load can be distributed across the cluster.
The tags to aggregate.
Return a ReadSideProcessor#ReadSideHandler for the given offset type.
Return a ReadSideProcessor#ReadSideHandler for the given offset type.
The offset processor.
The name of this read side.
The name of this read side.
This name should be unique among the read sides and entity types of the service. By default it is using the
short class name of the concrete ReadSideProcessor
class. Subclasses may override to define other type names.
It is wise to override and retain the original name when the class name is changed because this name is used to
identify read sides throughout the cluster.
A read side processor.
Read side processors consume events produced by com.lightbend.lagom.scaladsl.persistence.PersistentEntity instances, and update some read side data store that is optimized for queries.
The events they consume must be tagged, and a read side is able to consume events of one or more tags. Events are usually tagged according to some supertype of event, for example, events may be tagged as
Order
events. They may also be tagged according to a hash of the ID of the entity associated with the event - this allows read side event handling to be sharded across many nodes. Tagging is done using com.lightbend.lagom.scaladsl.persistence.AggregateEventTag.Read side processors are responsible for tracking what events they have already seen. This is done using offsets, which are sequential values associated with each event. Note that end users typically will not need to handle offsets themselves, this will be provided by Lagom support specific to the read side datastore, and end users can just focus on handling the events themselves.