com.lightbend.lagom.scaladsl.persistence
Factory method of AggregateEventTag.
Convenience factory method of AggregateEventTag that uses the
class name of the event type as tag
.
Convenience factory method of AggregateEventTag that uses the
class name of the event type as tag
. Note that it is needed to
retain the original tag when the class name is changed because
the tag is part of the store event data.
Select a shard given the number of shards and the ID of the entity.
Select a shard given the number of shards and the ID of the entity.
The number of shards.
The ID of the entity.
The selected shard number.
Generate a shard tag according to the base tag name and the shard number.
Generate a shard tag according to the base tag name and the shard number.
The base tag name.
The shard number.
The name of the shard tag.
Create a sharded aggregate event tag.
Create a sharded aggregate event tag.
Events that return this will be tagged with a tag that is based on a hash of the events persistence ID, modulo the number of shards.
The numShards
should be selected up front, and shouldn't change. If it does change, events for the
same entity will be produced by different event streams and handled by different shards in the read side
processor, leading to out of order event handling.
The base name for the tag, this will be combined with the shard number to form the tag name.
The number of shards.
The aggregate event shards tagger.
Create an aggregate event shards tagger.
Create an aggregate event shards tagger.
This is a convenience function that uses the name of the class as the tag name. Note that if the class name changes, the tag name must be retained, and so this method will no longer be suitable for use.
Events that return this will be tagged with a tag that is based on a hash of the events persistence ID, modulo the number of shards.
The numShards
should be selected up front, and shouldn't change. If it does change, events for the
same entity will be produced by different event streams and handled by different shards in the read side
processor, leading to out of order event handling.
The number of shards.
The aggregate event shards tagger.