Skip to content

AutorecoveringConnection doesn't use provided hostnames on init #153

Closed
@khaale

Description

@khaale

Hi RabbitMQ team,

Currently 3.6 .NET client has an issue with AutorecoveringConnection initialization - it always tries to connect to the host provided in connection factory, provided hostnames list is just ignored.

Looks like the issue caused by unused hostname at https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/master/projects/client/RabbitMQ.Client/src/client/impl/AutorecoveringConnection.cs#L577

        protected void Init(string hostname)
        {
            m_delegate = new Connection(m_factory, false, m_factory.CreateFrameHandler());

I suppose it should be used like

        protected void Init(string hostname)
        {
            m_delegate = new Connection(m_factory, false, m_factory.CreateFrameHandler(m_factory.Endpoint.CloneWithHostname(hostname)));

Regards, Alex K.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions