Ejecting when allowDerivativeOnHistoricalEvent is set to true
This commit is contained in:
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(
|
||||||
|
|||||||
Reference in new issue
Block a user