Skip to content

Missing IRecoveryable implementation #998

@szarykott

Description

@szarykott

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:

  1. Implement IRecoverable interface for AutorecoveringConnection
  2. Remove comments and orphaned event handlers suggesting that this interface should be implemented (and enhance documentation regarding disconnection handling if possible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions