Alex_255
unread,Jul 1, 2024, 3:08:51 PM (4 days ago) Jul 1Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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.