I’m using the DisruptorCommandBus and need the following semantics:
- All events must be written to the EventStore before commencing to deliver it to any EventHandlers.
- Delivery of Events to EventHandlers must not happen in the threads doing invoking, nor in threads doing the persisting in the EventStore (so I think I want the AsynchronousCluster).
- Events for the same instance of an AR must be processed in the sequence they were written to in the EventStore, but different AR instances can be processed in parallel (SequentialPerAggregatePolicy).
I haven’t fully thought out how I want to handle EventHandlers having errors yet.
I’m wiring everything together with Spring, but I don’t think I fully understand how to create an AsynchronousCluster with the values I want (is it really just with constructor-args?), and once I have an asyncCluster bean, I’m not sure how it relates to axon:cluster/ and axon:event-bus/ nor the axon:disruptor-command-bus’ publisher-threads.
Is there a magic ingredient I’m missing?