RabbitMQ .NET Client v7.0.0-rc AutomaticRecovery issue

43 views
Skip to first unread message

Alex_255

unread,
Jul 1, 2024, 3:08:51 PM (4 days ago) Jul 1
to rabbitmq-users
The automatic recovery function is triggered only once if the RabbitMQ server is stopped.
For playback, I use "rabbitmq:3-management" docker image as a server and this simple code:


using RabbitMQ.Client;

namespace RabbitMQTest
{
    internal class Program
    {
        static async Task Main(string[] args)
        {
            var factory = new ConnectionFactory()
            {
                HostName = "xxx.xxx.xxx.xxx",
                VirtualHost = "vh_1",
                UserName = "guest",
                Password = "guest",
                AutomaticRecoveryEnabled = true,
                TopologyRecoveryEnabled = true
            };
            using (var connection = await factory.CreateConnectionAsync())
            {
                var channel = await connection.CreateChannelAsync();
                Console.ReadKey();
            }
        }
    }
}


The connection and channel are restored if the docker container has been stopped and started.
But the connection and the channel are not restored if you do it again.

In case of loss of the Ethernet connection, this problem does not arise.
There is also no such problem for the client version 6.8.1.

Luke Bakken

unread,
Jul 1, 2024, 7:04:06 PM (4 days ago) Jul 1
to rabbitmq-users
Hi Alex,

Rather than report an issue on this mailing list, please use the rabbitmq-dotnet-client repository on GitHub.


I will take some time to investigate. Please watch that issue on GitHub.

I am assuming that you are using "docker stop" and "docker run" to stop and start your container.

Thanks,
Luke

Luke Bakken

unread,
Jul 2, 2024, 3:13:20 PM (3 days ago) Jul 2
to rabbitmq-users
Hi Alex,

Thank you for testing and reporting this issue. It is indeed a real bug, and I have opened the following PR to fix it:

I will release 7.0.0-rc.4 with this change as soon as GitHub actions pass.

Thanks!
Luke

Luke Bakken

unread,
Jul 3, 2024, 4:41:11 PM (2 days ago) Jul 3
to rabbitmq-users
Reply all
Reply to author
Forward
0 new messages