With the Configuration API, just start with a:
Configurer configurer = DefaultConfigurer.defaultConfiguration()
or
Configurer configurer = DefaultConfigurer.jpaConfiguration(…) // this will automatically configure JPA implementations of several components.
From there, check which methods the configurer gives you to get a feel on what you can configure. Once you’re done, just:
Configuration configuration = configurer.buildConfiguration();
// perhaps you want to get some configured elements (such as command bus) before starting. Do that here.
configuration.start();
// now you can start sending commands on the command bus.
//when shutting down, you can
configuration.shutdown();
I see you explicitly call start on the EventHandlingConfiguration. That shouldn’t be necessary, and may in fact also prevent it from working correctly.
A few more simplifications:
you can use configurer.registerEmbeddedEventStore(new InMemoryStorageEngine()) to create an in-memory event store.
no need to configure the EventSourcingRepository. You’ll get one by default
no need to configure the CommandBus. You’ll get the SimpleCommandBus by default.