-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Using pub/sub GetSubscriber() with RedisCacheConnectionPoolManager #266
Comments
Hi @wluke switch (e.FailureType)
{
case ConnectionFailureType.ConnectionDisposed:
case ConnectionFailureType.InternalFailure:
case ConnectionFailureType.SocketClosed:
case ConnectionFailureType.SocketFailure:
case ConnectionFailureType.UnableToConnect:
{
logger.LogError(e.Exception, "Redis connection error {0}.", e.FailureType);
this.Invalidate();
this.invalidateConnectionCallback();
break;
}
} What you are saying is that the connection multiplexer is raising one of the events listened in that block of code, before to retry. Do you have an easy step to reproduce the issue? Unit test or anything? |
Just another question? Let me know |
Hi @imperugo , Exactly! If the ConnectionMultiplexor is used separately if fires the connection failed and then connection restored, and the subscriptions remain. In order to reproduce I've simply been restarting redis, which triggers the connection failed. I would suggest being a little less aggressive with the disposing, as the connectionmultiplexor or generally pretty good at reconnecting itself. I'm not using Core currently. Thanks! |
Hi @wluke
|
Just found a way to handle this better (and I've to write a better documentation for this). If I get an error during the reconnect, I dispose it. Does it make sense to you? I'll send a package update within Sunday. |
Sounds great! How do you check for error during reconnect? |
there is a property into the args called |
6.1.7 is out and should fix the problem. Thanks |
It seems that if a connection drops, the RedisCacheConnectionPoolManager then disposes of the ConnectionMultiplexor (not giving it a chance to reconnect and reattack the subscriptions).
Is this designed to work with the pub/sub and reconnect, and if so how should this be setup?
The text was updated successfully, but these errors were encountered: