Axon App Resorts to In-Memory Token Store with Spring Boot 3.2.2

Hello Axon Team,

I have observed that prior to Spring Boot 3.2.2, the axon - based spring boot app connects to the JPA token store successfully, only in this version (3.2.2) is it unable to do so and reverts to a in-memory token store…

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.2.2)
...
2024-01-29T08:43:43.753+03:00  INFO 64149 --- [KOLYDE-POINT-SYSTEM] [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2024-01-29T08:43:43.808+03:00  INFO 64149 --- [KOLYDE-POINT-SYSTEM] [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 6.4.1.Final
2024-01-29T08:43:43.840+03:00  INFO 64149 --- [KOLYDE-POINT-SYSTEM] [           main] o.h.c.internal.RegionFactoryInitiator    : HHH000026: Second-level cache disabled
2024-01-29T08:43:44.102+03:00  INFO 64149 --- [KOLYDE-POINT-SYSTEM] [           main] o.s.o.j.p.SpringPersistenceUnitInfo      : No LoadTimeWeaver setup: ignoring JPA class transformer
2024-01-29T08:43:44.977+03:00  INFO 64149 --- [KOLYDE-POINT-SYSTEM] [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
2024-01-29T08:43:45.057+03:00  INFO 64149 --- [KOLYDE-POINT-SYSTEM] [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2024-01-29T08:43:45.860+03:00  INFO 64149 --- [KOLYDE-POINT-SYSTEM] [           main] o.a.config.AxonIQConsoleModule           : 
################################################################################################
## You have not configured AxonIQ Console. AxonIQ Console provides out-of-the box monitoring  ##
## and management capabilities for your Axon Application, starting with it is free.           ##
## Visit https://console.axoniq.io for more information!                                      ##
## Suppress this message by setting system property disable-axoniq-console-message to true.   ##
################################################################################################

2024-01-29T08:43:46.911+03:00  INFO 64149 --- [KOLYDE-POINT-SYSTEM] [           main] o.s.d.j.r.query.QueryEnhancerFactory     : Hibernate is in classpath; If applicable, HQL parser will be used.
2024-01-29T08:43:48.271+03:00  INFO 64149 --- [KOLYDE-POINT-SYSTEM] [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 3 endpoint(s) beneath base path '/actuator'
2024-01-29T08:43:48.883+03:00  INFO 64149 --- [KOLYDE-POINT-SYSTEM] [           main] o.s.b.web.embedded.netty.NettyWebServer  : Netty started on port 8000
2024-01-29T08:43:48.952+03:00  WARN 64149 --- [KOLYDE-POINT-SYSTEM] [           main] o.a.e.t.inmemory.InMemoryTokenStore      : An in memory token store is being created.
This means the event processor using this token store might process the same events again when the application is restarted.
If the use of an in memory token store is intentional, this warning can be ignored.
If the tokens should be persisted, use the JPA, JDBC or MongoDB token store instead.
...

Kindly look into the issue…

@KahigaKiguru, thanks for sharing this concern.
We’ve discovered this discrepancy through other channels, too, and have a fix for it already.

This pull request, slated for 4.9.2 of Axon Framework, fixes the ordering of auto configuration beans.
Furthermore, the release will be made somewhere this week.

Hence, your current workaround would be to not upgrade Spring Boot to 3.2.2 yet.
I hope that clarifies things!

Ow, and btw:

Know that this is a public forum where you can reach any Axon user, not just AxonIQ team members.
Furthermore, the AxonIQ team checks the board on a best-effort basis. Thus chances are very high that your communication isn’t directed to us alone. :wink:

1 Like