In a small toy project, we are not relying on SpringBoot, but on Ktor for running Axon application. In doing so, we configure AxonFramework in a SE-way (using configurer).
For the development time, we used InMemory Store implementations for both Event and Saga stores and everything worked fine.
For going to production, we decided to just use the minimal setup and tried to get stuff running using JdbcStore.
For doing so, we tried out and failed with the following setups:
- Hikari CP with MySQL 7.x
- Driver MySQL 7.x
- Hikari CP with MariaDB latest
- Driver MariaDB latest
The errors (more or less the same) were: too many connections.
If using Hikari, it complaints about missing commit in transaction (leaving a dirty transaction). The native DB drivers are not complaining, but just fail after some (very short) time.
In a meantime, we switched to AxonServer and everything works as desired.
P.S. The implementation is straight forward:
-> ConnectionProvider retrieves the connection directly from a DataSource
-> TransactionManager is creating a new Transaction using connection as a backing field, switches autocommit off and runs commit / rollback directly on connection.