Closed LangInteger closed 1 year ago
@vietj @paulbakker Any suggestions on this problem?
I found this code works in my case:
//make sure the client is reconnected o error
this.redisClient.endHandler(e -> {
// attempt to reconnect
attemptReconnect(0);
});
and there are other people ran into the same issue:
Maybe we need some improvement in the reconnect - official doc?
@tsegismont https://github.com/vert-x3/vertx-redis-client/pull/377 I opened a pull request to improve the reconnection code
need a backport to 4.x
Questions
RedisConnection.exceptionHandler is not called when connnection is marked as closed
Version
4.4.0
Context
The vertx redis reconnection demo introduced at docs cannot work in the case when redis instances shutdown and get back to ready.
Do you have a reproducer?
Yes, I have a reproducer, the code is at: https://github.com/LangInteger/redis-reconnect-test
make http request again
exception will be thrown by send api:
The code is:
Extra
The status check of RedisStandaloneConnection before writing a message to netSocket makes sense at first glance, but the reconnect demo mentioned above should work. We need a connection with a more solid exception handler mechanism. Can we fix this problem?