Hi I forked the AxonBank sample project (Axon 3.0.1) and added an EventScheduler on BankTransferManagementSaga to Test EventScheduler.
Here the commit diff
This is the Scheduler config:
`
@Bean
public EventScheduler eventScheduler(EventBus eventBus) {
return new SimpleEventScheduler(Executors.newScheduledThreadPool(5), eventBus);
}
`
on the BankTransferManagementSaga I added one Scheduled DummyScheduledEvent.
On publishing BankTransferCreatedEvent the Saga Schedule DummyScheduledEvent after 30 seconds.
`
eventScheduler.schedule(
Instant.now().plusSeconds(30),
new DummyScheduledEvent(event.getBankTransferId())
);
`
debugging the Scheduler I can see it starts and complete without errors but the eventHandler on the Saga is never called:
`
@SagaEventHandler(associationProperty = “bankTransferId”)
public void on(DummyScheduledEvent event) {
System.out.println("Scheduled Event " + event);
}
`
Is it a Bug or I’m missing something?
Regards