rabbitmq-dotnet-client
rabbitmq-dotnet-client copied to clipboard
Missing IRecoveryable implementation
I think I found one missing IRecoverable interface implementation.
Problem
As code snippet from master branch says in the comment it should be implemented for channels and connections, whereas it is only implemented for various classes related to autorecovering models.
namespace RabbitMQ.Client
{
/// <summary>
/// A marker interface for entities that are recoverable (currently connection or channel).
/// </summary>
public interface IRecoverable
{
event EventHandler<EventArgs> Recovery;
}
}
What is more, actual event required by the interface is implemented for internal class AutorecoveringConnection (as RecoverySucceeded), just the class is not marked with IRecoverable interface implementation, only with IConnection. As class is internal, it seems not possible to even cast to it without reflection hacks to subscribe to the event.
It seems like a regression from previous versions as code suggests that it was meant to be implemented. Effectively it prevents my company from upgrading to newer version of library as we rely on Shutdown and RecoverySucceeded event to unpool faulty Rabbit instances.
We'd love to upgrade to newer version due to promised allocation improvements (and further ones in future versions as well!)
Expected behavior
Either:
- Implement
IRecoverableinterface forAutorecoveringConnection - Remove comments and orphaned event handlers suggesting that this interface should be implemented (and enhance documentation regarding disconnection handling if possible)
You are welcome to submit a PR that restores the implementation of IRecoverable (arguably we should rename the event to RecoverySucceeded since Recovery is not specific at all).
Thank you for clarification! I will submit the PR soon.
I just noticed RecoverySucceeded is back in IConnection in version of the code currently on master. Having it there makes it not needed to implement what I proposed. Real question becomes - when a package version with it back will be published? I am using version 6.2.1 (from August 20th 2020) that seems newest one, while event was put back in IConnection mid September 2020.
Hey, any news on when could a new version of the library be released? Source code seems ok with what is currently on master, but there is still no new release.
Either way, it is possible that this issue could be closed as soon as the new version is released.