-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Serverless issue - psubscribe error - how can I disable in Spring #3075
Comments
|
@mp911de apologies for commenting on a closed issue. I'm in a situation where we are also using Redis-backed sessions and using an ElastiCache Serverless instance setup by another team. We're trying to avoid the situation of having to make our own ElastiCache cluster, if at all possible. If we do not plan to use I am assuming that if we do not use session create/expire/destroy event listeners that there would be no impact to functionality. Or, is there internal functionality that we would break? Maybe some functionality that cleans up expired sessions. |
How about not registering |
I could not solve this with AWS Elasticache Serverless (using their Valkey or Redis offering) |
|
@dreamstar-enterprises what version of Spring Boot are you using? I did some testing on a very basic sample application this morning. I found that Spring Boot 2.x requires psubscribe when you use For this very basic application, moving off of the legacy Spring Boot 2.x fixes the issue, so long as you do not need an indexed repository. I'm working to validate this on a real world application. |
Hi Clete, I'm using :: Spring Boot :: (v3.3.7) Here is my security chain config - and redis connection factory, but I still got the pub / sub issue (and a few other issues with Spring Security, Spring Redis, and Spring Session, since I started on my project in July 2024...) I'm also using the reactive version, Spring Webflux. Cheers,
|
@dreamstar-enterprises I read the code that sets up the session configuration. In 2.7, both annotations ( You should read this to determine if you need the indexed repository: https://docs.spring.io/spring-session/reference/getting-started/using-redis.html#choosing-between-regular-and-indexed If you need the indexed repository, I am afraid you have no choice but to move to clustered mode. For us, we are fortunate that we don't need the indexed repository, nor do we utilize lifecycle events. Edit:
As you can see, in 3.x, the |
Hi,
I'm using AWS Elasticache Serverless, and in the logs keep seeing the below errors.
I thought I had turned pub/sub events off in my app, but keep getting 2 errors and cannot see where I have gone wrong.
Can someone help?
Here are the 2 errors, and then my Spring Connection Factory Code:
Caused by: io.lettuce.core.RedisCommandExecutionException: ERR unknown command 'psubscribe', with args beginning with: spring:session:event:0:created:*
Caused by: org.springframework.data.redis.connection.PoolException: Returned connection io.lettuce.core.cluster.StatefulRedisClusterPubSubConnectionImpl@692dc72c was either previously returned or does not belong to this connection provider
ERROR 1
ERROR 2
CONNECTION FACTORY
The text was updated successfully, but these errors were encountered: