Project: springxd
Issue XD-1067: Container with redis as transport emits stack trace on shutdown
This is "harmless" (the attempt to brpop continues even after the connection itself has been closed), but ugly: {code} 12:45:15,084 ERROR redisInboundAdapter-redis:queue-inbound-channel-adapter1 inbound.RedisQueueMessageDrivenEndpoint:181 - Failed to execute listening task. Will attempt to resubmit in 5000 milliseconds. org.springframework.data.redis.RedisSystemException: Redis exception; nested exception is com.lambdaworks.redis.RedisException: Connection closed org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:46) org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:36) org.springframework.data.redis.connection.lettuce.LettuceConverters.toDataAccessException(LettuceConverters.java:159) org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:253) org.springframework.data.redis.connection.lettuce.LettuceConnection.bRPop(LettuceConnection.java:1508) org.springframework.data.redis.core.DefaultListOperations$12.inRedis(DefaultListOperations.java:163) org.springframework.data.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:51) org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:185) org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:153) org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:86) org.springframework.data.redis.core.DefaultListOperations.rightPop(DefaultListOperations.java:160) org.springframework.data.redis.core.DefaultBoundListOperations.rightPop(DefaultBoundListOperations.java:105) org.springframework.integration.redis.inbound.RedisQueueMessageDrivenEndpoint.popMessageAndSend(RedisQueueMessageDrivenEndpoint.java:178) org.springframework.integration.redis.inbound.RedisQueueMessageDrivenEndpoint.access$300(RedisQueueMessageDrivenEndpoint.java:51) org.springframework.integration.redis.inbound.RedisQueueMessageDrivenEndpoint$ListenerTask.run(RedisQueueMessageDrivenEndpoint.java:286) org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52) java.lang.Thread.run(Thread.java:724) Caused by: com.lambdaworks.redis.RedisException: Connection closed com.lambdaworks.redis.RedisAsyncConnection.await(RedisAsyncConnection.java:1079) com.lambdaworks.redis.RedisConnection.await(RedisConnection.java:820) com.lambdaworks.redis.RedisConnection.brpop(RedisConnection.java:101) org.springframework.data.redis.connection.lettuce.LettuceConnection.bRPop(LettuceConnection.java:1506)	... 12 more {code} We should shutdown the consumer gracefully (i.e. before the connection is closed).
Story points: 3