Ejecting when allowDerivativeOnHistoricalEvent is set to true

This commit is contained in:
bskjon committed 2026-06-04 18:28:35 +02:00
1 parent ad45259746
commit ed4a626af3
1 file changed
+4
@@ -60,6 +60,10 @@ open class EventDispatcher(val eventStore: EventStore, private val lifecycleStor
) )
) )
onDispatched(candidate, listener, DispatchResult.Accepted) onDispatched(candidate, listener, DispatchResult.Accepted)
if (listener.allowDerivativeOnHistoricalEvent()) {
log.debug { "⏹️ Listener ${listener::class.simpleName} requested historical derivation → stopping dispatch early" }
return
}
} else { } else {
lifecycleStore.add( lifecycleStore.add(
ListenerResult( ListenerResult(