Disable event sourcing of non aggregate events?

Is it possible in axon 3.x to disable “event sourcing” of events which doesn’t belong to any aggregate?

You can subclass or wrap the EventStorageEngine and only forward Events to the “real” storage if they implement DomainEventMessage. The method you want to override is “appendEvents”.



coming to axon after few years. I just upgraded my sample application from axon 3.x to 4.1 and wondering if this is still the case? Do I need to subclass EventStorageEngine/other class to not persist events which are published from not event-sourced aggregate? Or is there some class/switch which does it for me?



Hello Lukas,
You might see if FilteringEventStorageEngine works for you. Unfortunately, it is not currently compatible with Axon Server. HTH.