Occurrent 0.14.1 is now available. It’s a small release that contains the following changes:

  • Using insert from MongoTemplate when writing events in the SpringMongoEventStore. Previously, the vanilla mongoClient was (accidentally) used for this operation.
  • When using the spring boot starter project for MongoDB (org.occurrent:spring-boot-starter-mongodb), the transaction manager used by default is now configured to use “majority” read- and write concerns. To revert to the “default” settings used by Spring, or change it to your own needs, specify a MongoTransactionManager bean. For example:

    @Bean
    public MongoTransactionManager mongoTransactionManager(MongoDatabaseFactory dbFactory) {
      return new MongoTransactionManager(dbFactory, TransactionOptions.builder(). .. .build());
    }
    
  • Separating read- and query options configuration so that you can e.g. configure queries made by EventStoreQueries and reads from the EventStore.read(..) separately.
    This useful if you want to e.g. allow queries from EventStoreQueries to be made to secondary nodes but still force reads from EventStore.read(..) to be made from the primary. You can configure this by supplying a readOption (to configure the reads from the EventStore) and queryOption (for EventStoreQueries) in the EventStoreConfig. This has been implemented for SpringMongoEventStore and ReactorMongoEventStore.