// the 0 means we do not need any "intermediate commit" during the replay.
// The BackloggingIncomingMessageHandler will make sure any events published while replaying are backlogged
// and postponed until the replay is done.
ReplayingCluster replayingCluster = new ReplayingCluster(new SimpleCluster("simple"), eventStore,
new NoTransactionManager(), 0,
new BackloggingIncomingMessageHandler());
// we initialize an event bus that contains our replaying cluster
EventBus eventBus = new ClusteringEventBus(new DefaultClusterSelector(replayingCluster));
// we subscribe our two listeners to the Event Bus