general way of catching connection related lettuce redis exceptions
See original GitHub issueHi. I am trying to implement my own custom reconnection logic handling such that whenever there are any exceptions throwing related to connection problem it will trigger this custom reconnection logic to create a new lettuce client (through Load Balancer). Is there a general way to catch all connection related exceptions? I have seen many connection problem that are instanceof
RedisException
(which is very general). Can you offer any tips?
I am currently using lettuce connection pooling as my client
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Lettuce Reference Guide
Host and port mappers for Lettuce usage behind connection tunnels/proxies through SocketAddressResolver , see Configuring Client resources.
Read more >Error: io.lettuce.core.RedisConnectionException Unable to ...
the redis server is running locally. The book didn't specify where to put the redis host name and port so I think it's...
Read more >Spring Data Redis
Lettuce is a Netty-based open-source connector supported by Spring Data Redis through the org.springframework.data.redis.connection.lettuce ...
Read more >lettuce-io/Lobby - Gitter
RELEASE ,when i start my service i can connect redis client ,but , if i dont use ,ten or more minutes later ,...
Read more >Redis Lettuce integration with Java Spring Boot | BytePitch
Looking at the client options, we will simply reject any requests to Redis in disconnected state while attempting to automatically reconnect to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For that case, please configure a custom
SocketAddressResolver
. DNS resolvers might not be used when using e.g. domain sockets.Hi @mp911de so do you think that I can customize the autoreconnect behavior such that whenever connect or reconnect is triggered it will invoke the custom connect logic with
DefaultClientResources.builder().dnsResolver(host -> custom_reconnect_logic(host))
? Cuz for autoreconnect I don’t want it to just try reconnect to the same server node that was configured in redis uri initially, but to a different server node [through load balancer to find the next available server node to connect to] (the custom reconnect logic)