I am using Spring boot 2 with spring webflux running on netty.
I would like to add session management without needing to have a backing database or redis server (so Spring Session doesn't seem to be a solution here).
I could use WebSession in my controllers, but then I would need to enable sticky sessions on my load balancer, which I would prefer to avoid.
What I would like is one of the following:
Has anyone experienced the same thing and found a viable solution?
Spring Session has plans for providing Hazelcast implementation of ReactiveSessionRepository
. The current plan is to wait for Hazelcast 4.0, which will move to Java 8 as baseline and use CompletableFuture
instead of their own ICompletableFuture
. You can track gh-831 for progress on this topic.
In the meanwhile you could try and use ReactiveMapSessionRepository
, passing in Hazelcast's IMap
.