Hello, Allard.
Thanks for the pointer.
`
gateway.send©.whenComplete((result, exception) -> log.info(“Result: {} {}”, result, exception));
`
logs:
`
Result: 1d1738ca-9942-4036-928e-be0e3a735c5e null
`
So the command itself is successful.
I end up with the event for the creation of “Test” but with no event related to “Test2” in the event store. I also used the command bus directly before (as opposed to the gateway), with the same result.
The process is triggered via:
`
gateway.send(new CreateTestCommand(IdentifierFactory.getInstance().generateIdentifier()));
`
From a trivial UI component for testing.
Potentially relevant parts of the configuration. This worked just fine with Axon 3 M4
`
@EnableAxon
@Configuration
public class AxonConfigs {
[…]
@Bean
`
public EventStore eventStore() {
return new EmbeddedEventStore(eventStorageEngine());
}
@Bean
EventBus eventBus() {
return eventStore();
}
@Bean
public ResourceInjector resourceInjector() {
return new SpringResourceInjector();
}
@Bean
public ThreadPoolTaskScheduler taskScheduler() {
ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
scheduler.setThreadNamePrefix(“AxonEventScheduler-”);
scheduler.setPoolSize(Runtime.getRuntime().availableProcessors());
scheduler.setRemoveOnCancelPolicy(true);
return scheduler;
}
@Bean
public SimpleEventScheduler eventScheduler() {
return new SimpleEventScheduler(taskScheduler().getScheduledExecutor(), eventStore());
}
@Bean
EventStorageEngine eventStorageEngine() {
return new MongoEventStorageEngine(
new DefaultMongoTemplate(mongoClient, database, eventStoreCollection, snapshotsCollection));
}
@Bean
public SagaStore sagaStore() {
return new MongoSagaStore(new org.axonframework.mongo.eventhandling.saga.repository.DefaultMongoTemplate(
mongoClient, database, sagaCollection));
}
[…]
}
Thanks.
Best regards,
Dominic