Doing performance profiling of my application, I’ve found it spends a sizable amount of time interacting with Quartz since it makes heavy use of scheduled events.
The thought occurred to me that for any Axon 3 app that uses tracking event processors, Quartz could be superfluous. The event processors could limit their event log queries by timestamp and not examine any events with timestamps in the future. Then scheduling an event would just be publishing it normally, but with the timestamp set to the scheduled time rather than the current time.
Obviously there are challenges here, not least of which is that Axon 3 no longer orders events by timestamp. Canceling upcoming events would also require some design tradeoffs (giving up immutability of the event log or keeping a secondary store of canceled event IDs, etc.) and how this interacts with transactions would have to be thought through. But removing a fairly heavyweight dependency and at the same time getting a measurable performance gain seems appealing to me.
Maybe this idea is completely nuts for some reason that hasn’t occurred to me, but I figured I’d toss it out there.