remove prefix from journal persistence ID's and tags
zenyui opened this issue · comments
Is your feature request related to a problem? Please describe.
- The persistence ID in the journal does not need the
chiefofstate|<id>
format. We should simplify by removing thechiefofstate|
prefix. - Similarly, our tags unnecessarily have a
chiefofstate
prefix, and we only apply a single tag per entity to enable sharded projections.
Per the akka persistence docs:
That format of the
PersistenceId
is not mandatory and only provided as a convenience of a "standardized" format.
Describe the solution you'd like
-
Manually invoke the PersistenceId constructor (currently in startnodebehavior)
-
Eliminate our tagging method and pass through the shard ID as the tag explicitly in the aggregate root like:
.withTagger(_ => Set(shardIndex.toString))
- provide a data migration that removes the
chiefofstate|
prefix from all events and tags
Additional context
This will probably help us write journal tools in the future.