Skip to content
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

Connection recovery issue when docker container stopped / started. #1623

Closed
lukebakken opened this issue Jul 1, 2024 · 0 comments · Fixed by #1624
Closed

Connection recovery issue when docker container stopped / started. #1623

lukebakken opened this issue Jul 1, 2024 · 0 comments · Fixed by #1624
Assignees
Labels
Milestone

Comments

@lukebakken
Copy link
Contributor

lukebakken commented Jul 1, 2024

Describe the bug

Reported here:
https://groups.google.com/g/rabbitmq-users/c/E9sJOOEwFEs

Reproduction steps

As reported by the user:


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant