Since Axon 3.2 we have the ability to trigger replay using special API, without the need to delete tokens from DB.
Also, we have a control, what events would be applied during replay via @AllowReplay(boolean).
There are some kinds of events, which are by their nature only operational, they make sense only here and now, for example, the event causing sending sms/email. Hence, it obvious that there is no sense to persist such event because it makes no sense to replay it, it doesn’t cause a state change of any aggregate.
Does Axon provide controls over this? Probably I’m missing something, however, googling didn’t help.
In this it would make sense to have a special header as part of every event which is telling you that you are running in a replayed mode. Us just an idea.
For technical (non-business) events you could use a SimpleEventBus which does not persist events while publishing them. I’m not aware of a feature provided by Axon that supports selective event persistence. You are welcome to create an issue here in order for others to consider it.
thank you! I like your approach the most. So now after applying FilteringEventStorageEngine I can explicitly annotate my events with @OperationalEvent and forget about persistance and replay questions, and moreover it can be explicitly logged why persistance skipped.
середа, 29 серпня 2018 р. 13:43:11 UTC+3 користувач Steven van Beelen написав: