Search code examples
publish-subscribejedisspring-sessionspring-data-redisredis-cluster

Spring session enabled application does not receive session events from redis cluster


We are using spring-session to store user sessions in redis cluster. We want to receive session-created and session-destroyed events. However it seems, redis cluster does not publish events properly. We receive session events if we use standalone redis server.

We have enabled all notifications on all redis nodes in the cluster.

Is event publishing/subscription supported with redis clusters?

It seems while using cluster, it tries to subscribe to only one node in the cluster. Should it subscribe to all nodes?


Solution

  • It was a Jedis issue which has been fixed in https://github.com/xetorthio/jedis/issues/1258.

    Also go through the replies of issue reported on git-hub for more information : https://github.com/spring-projects/spring-session/issues/478