Declare an in-memory token store beside an in-memory event storage engine

Proprietary

Axon Framework 4 kept event processors' tokens in memory when the application had no JPA or JDBC token store. Axon Framework 5's Spring Boot autoconfiguration declares a token store only around an EntityManagerFactory or a DataSource, and a streaming event processor without one fails at startup. A @Bean returning an InMemoryEventStorageEngine gets an InMemoryTokenStore bean beside it when the repository declares no token store of its own and neither JPA nor Spring JDBC is on the classpath.

io.moderne.axon.AddInMemoryTokenStoreBean
mod run . --recipe=io.moderne.axon.AddInMemoryTokenStoreBean

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.