0

In my application im using spring session with redis as the data store. We track if a user is logged in/not based on the Session Destroyed event. Whenever we receive this event we will mark that session as inactive.

However I'm facing issues when the event is not getting published sometimes. I can see this in the log "Unable to publish SessionDestroyedEvent for session". Checking few examples when I checked the time on when this log was printed and when the session was actually destroyed I found that the difference is huge like a day/two even sometimes. As session key will be available only 5 minutes after it is expired due to the lag in the onMessage method it is not able to find the session and hence is not able to publish the SessionDestroyedEvent.

I'm yet to find out the cause of this lag, but is there any other way with which I can still make sure that I can still work on these session Id's without depending upon the event? One way I can think of is manually overriding the onMessage method but that will be too much work. And has anyone else also faced this kind of lag

asked Apr 14 at 14:43

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.