Greetings,
I’m working on a monolith Enterprise application using SpringFramework 4x & Axon 2.4.6. and the event sourcing infrastructure built on Axon ClusteringEventBus.
The current structure as follows:
multiple clusters for instance those 2 type of clusters:
<axon:cluster id="syncCluster" order="5000">
<axon:replay-config event-store="eventStore" transaction-manager="transactionManager" commit-threshold="5000"/>
<axon:selectors>
<axon:annotation check-superclass="true" type="com.example.ClusterAnnotation"/>
</axon:selectors>
</axon:cluster>
<axon:cluster id="asyncCluster" order="6000">
<axon:replay-config event-store="eventStore" transaction-manager="transactionManager" commit-threshold="5000"/>
<axon:selectors>
<axon:annotation check-superclass="true" type="com.example.ClusterAnnotation"/>
</axon:selectors>
<bean class="org.axonframework.eventhandling.async.AsynchronousCluster">
<constructor-arg name="identifier" value="myCluster"/>
<constructor-arg name="executor" ref="asyncExecutor"/>
<constructor-arg name="transactionManager" ref="clusterTransactionManager"/>
<constructor-arg name="sequencingPolicy" ref="fullConcurrencyPolicy"/>
<constructor-arg name="errorHandler" ref="myErrorHandler"/>
</bean>
</axon:cluster>
and incase of failure, there’s event replay mechanism only for that specific cluster with criteria as follows:
public void replayEventsForAggregate(final String aggregateIdentifier,ReplayingCluster replayCluster){
final Criteria criteria = getCriteriaThatListAllEventsForAggregate(aggregateIdentifier,replayCluster);
replayCluster.startReplay(criteria);
}
the goal: is to migrate to Spring framework 5 and Axon 4.
Since cluster event bus is no longer exist in Axon4 what would be the best way to implement such structure in Axon 4 without clustering?