環境:
spring-boot-starter 2.x 和 sprig-data-starter-data-redis 2.x
在使用
connection.bRPop(timeout, rawKey);
方法時,如果這裏的timeout大於springboot配置文件的spring.redis.timeout,就會出現異常io.lettuce.core.RedisCommandTimeoutException: Command timed out after。
所以解決方法就是timeout不要超出連接池的timeout就好了