I\'m new to redis. I\'ve followed this tutorial to use HttpSession with redis.
https://docs.spring.io/spring-session/docs/current/reference/html5/guides/boot.html
Try this
usersSessions.forEach((session) -> { sessionRegistry.delete(session.getId()); });