chore(migration): document @EventTag migration for Axon 5 compatibiity#4538
Conversation
…lity Add comprehensive guidelines for migrating from `@AggregateIdentifier` to `@EventTag` in Axon Framework 5. Include examples for explicit and derived tag keys, architecture-neutral constraints, and Dynamic Consistency Boundaries (DCB) preparations.
hatzlj
left a comment
There was a problem hiding this comment.
Two minor spelling suggestions, otherwise looks like a very helpful addition 👍
| ==== | ||
| * `@AggregateIdentifier` is **no longer required** on the entity (also see xref:migration:paths/aggregates/configuration-migration.adoc[entity configuration migration]). | ||
| * Each event must declare a `@EventTag` whose key matches the entity's `tagKey` and whose value is the entity identifier. | ||
| * Without migrating to xref:migration:understanding-architecture-principles.adoc#moving-away-from-aggregates[Dynamic Consistency Boundaries (DCB)], **exactly one `@EventTag` per event is supported and required** — the one matching the entity it belongs to. |
There was a problem hiding this comment.
We should teach our AIs to not put spaces before or after Em Dashes (violating our vale rule for em dashes)
| * Without migrating to xref:migration:understanding-architecture-principles.adoc#moving-away-from-aggregates[Dynamic Consistency Boundaries (DCB)], **exactly one `@EventTag` per event is supported and required** — the one matching the entity it belongs to. | |
| * Without migrating to xref:migration:understanding-architecture-principles.adoc#moving-away-from-aggregates[Dynamic Consistency Boundaries (DCB)], **exactly one `@EventTag` per event is supported and required**—the one matching the entity it belongs to. |
There was a problem hiding this comment.
i just reviewed the CLAUDE.md under docs/ and it reiterates rules configured via .vale.ini or our Axoniq vale package.
AxonIQ/axoniq-library-site#114 is an attempt to centralize the vale configuration which is currently distributed/inconsistent across several repos. In the course of that I think it makes sense to create some kind of AI instruction file in the central vale package which we can reference from the CLAUDE.md in our repositories instead of putting actual rules there that might be outdated. I've adjusted the issue for that to include a fix for the AI instructions. What do you think, would that work this way?
smcvb
left a comment
There was a problem hiding this comment.
Thanks for this rather important addition, @MateuszNaKodach! We definitely need a section explaining this. However, I think this may allow for a dedicated page, given the importance of it. Surely linked to from the index.adoc you've put it in right now.
Wdyt?
Extract the event tagging migration guide into its own page (aggregates/event-tagging.adoc), address grammar and em-dash style fixes from review, and wire up cross-references from messages.adoc and the aggregates index.
|
I made some adjustements after your comments @smcvb - please re-check that. |
smcvb
left a comment
There was a problem hiding this comment.
My concerns have been addressed, hence I'm approving this pull request.
Add comprehensive guidelines for migrating from
@AggregateIdentifierto@EventTagin Axon Framework 5. Include examples for explicit and derived tag keys, architecture-neutral constraints, and Dynamic Consistency Boundaries (DCB) preparations.