Deleting Events

Can I safely delete an event from my event store without negative effects? Will the tracking event processor care that some event indices are missing? Asking for a friend. :slight_smile:

Hi Joel,

My first reaction would be you should not delete events, events are things that happened and you can not rewrite history. If you no longer are interested in certain events you can just remove the event handler and that way the tracking event processor will skip the events of that type.
When you are developing an application however you can remove all events that are in the event store. If you are using Axon Server as an event store you can run it in development mode to be able to do that. See https://docs.axoniq.io/reference-guide/axon-server/installation/local-installation/axon-server-se#development-mode or by recreating the context. In other cases you can write a script to do that.
And last but not least the tracking event processor is able to cope with gaps in the event store so you should be good there but keep in mind that it must be an exceptional situation when you remove specific events.

Best!

Yvonne Ceelie

2 Likes

Thank you for the knowledge! I will reserve my delete powers for the most dire of situations.