Revision / Version of the domain event #63
Replies: 2 comments 4 replies
-
Hi Simon, that sounds interesting. In that case, I would also vote to enrich the @DomainEventHandler and @DomainEventPublisher with the version, so that the user can see where specific event versions can be consumed. One question though: This information would firstly help the developer to see where which events in which versions are consumed. Since you also raised the Axon-question: would it be possible to use this information there for event handling, i.e. to automatically only process events for specific versions? Best, |
Beta Was this translation helpful? Give feedback.
-
Wouldn't you rather expose something like this through the actual event type to be able to simply call a method on the instance rather than having to read that via reflection? Also, how would you load events of a former version then? Project them onto a class that's now annotated to be of a newer version? |
Beta Was this translation helpful? Give feedback.
-
Hi folks,
I wonder if there is a good idea to allow specifying a revision / version of the event using the
DomainEvent
annotation. I'm aware of "cool events never change" discussion, but sometimes it is still a good idea to have the notion of namespace/name/version coordinates to allow for event up-casting.Before creating a PR adding a revision field to
DomainEvent
I would like to listen to your opinion on that.Cheers,
Simon
Beta Was this translation helpful? Give feedback.
All reactions