non-spring-boot: how to register eventHandler and queryHandler


I am trying to get everything working without spring boot autoconfigure. Seems a lot changed from 3 to 4 …

With 3 I had:

final BankAccountProjection projection = new BankAccountProjection();

final Configuration configuration = DefaultConfigurer.defaultConfiguration()
.configureEventStore(c -> eventStore)
.registerModule(new EventHandlingConfiguration()
.registerEventHandler(c -> projection))
.registerQueryHandler(c -> projection)

But with 4, I fail to find the EventHandlingConfiguration to register the eventHandler. Ideas?

also: when I use my projection for event- and query handling, I will need to inject the queryUpdater, which I will probably not get upfront. How to enhance the configuration so my projection is update aware? Thanks!


ok, nevermind, found the docs on

val configuration = DefaultConfigurer.defaultConfiguration()
    .eventProcessing { epc -> epc.registerEventHandler { c -> projection } }
    .configureEventStore { eventStore }