Hi. Can someone explain a bit more to me? I’m not using Axon Server or any message queue, just two separate instances of the application with round-robin traffic routing. I have a JpaEventStorageEngine and also an EmbeddedEventStore. If I understood correctly, it is not a good idea to use the EmbeddedEventStore because each application has its own EmbeddedEventStore. What are the options?
@Bean
public JpaEventStorageEngine eventStorageEngine(Serializer serializer, DataSource dataSource, EntityManager entityManager) {
return JpaEventStorageEngine.builder()
.serializer(serializer)
.dataSource(dataSource)
.entityManagerProvider(entityManager::getEntityManagerFactory)
.build();
}
@Bean
public EventStore eventStore(JpaEventStorageEngine storageEngine) {
return new EmbeddedEventStore.Builder().storageEngine(storageEngine).build();
}