I have the following situation. I have a Saga that wants to schedule some event to happen after a certain other event. I use an @Autowired transient EventScheduler, for which the impl is QuartzScheduler. After I do:
eventScheduler.schedule(new DateTime(System.currentTimeMillis() + 10 * 1000), new SomeEvent());
The event is handled by the @EventHandlers, but is not stored in the event store db. Is this an expected behavior or have i messed up my transaction/DefaultUnitOfWork config for sagas?
Here is question in a nutshell:
Events created by normal flow do get saved in events store (i use a jpa event store).
Events scheduled by an EventScheduler in a Saga get handled by their corresponding EventHandlers but don’t get saved in the events store.
Is this intended, or am I doing something that I shouldn’t be doing?