尝试向 RabbitMQ 发送消息时出现以下错误。我们的应用程序在 linux VM 上的 .net core 3.0 上,RMQ 服务器在 linux VM 上的两个集群中运行。这个问题是间歇性的,并不总是发生。
Already closed: The AMQP operation was interrupted: AMQP close-reason, initiated by Library, code=541,
text='Unexpected Exception', classId=0, methodId=0, cause=System.Net.Sockets.SocketException (110):
Connection timed out
at RabbitMQ.Client.Impl.InboundFrame.ReadFrom(NetworkBinaryReader reader)
at RabbitMQ.Client.Framing.Impl.Connection.MainLoopIteration()
at RabbitMQ.Client.Framing.Impl.Connection.MainLoop()
我们通过将 AutomaticRecoveryEnabled 设置为 true 来启用自动恢复,除此之外,每个设置都是默认设置。