Already closed: The AMQP operation was interrupted Exception while sending out message. Code: 541

I have a .net core micro-service with Service Fabric using N service bus and Rabbit MQ as transport.
When ever I try to send/publish messages an AMQP exception is thrown.

“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 (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond\r\n at RabbitMQ.Client.Impl.Frame.ReadFrom(NetworkBinaryReader reader)\r\n at RabbitMQ.Client.Impl.SocketFrameHandler.ReadFrame()\r\n at RabbitMQ.Client.Framing.Impl.Connection.MainLoopIteration()\r\n at RabbitMQ.Client.Framing.Impl.Connection.MainLoop()”

I have the used the retry on the endpoint as immediate.

var recoverability = endpointConfiguration.Recoverability();
recoverability.Immediate(immediate => { immediate.NumberOfRetries(eventBusRetryCount); });

I am deploying my service to Azure Service Fabric PAAS.

I have RabbitMQ Client 3.7.7 installed

In my code I have used the following nugets
NserviceBus : 7.1.4 and
NserviceBus.RabbitMQ : 5.0.0

Can anyone tell me what is the root cause for the same?

The SocketException you are seeing indicates you’re having some sort of connectivity problem between the endpoint and the RabbitMQ broker.

And how is that mitigated when NServiceBus manages the connection?

@jgauffin I’m not sure what you’re asking. When I said that it looks like a connectivity problem, I mean that there is some sort of networking problem between the broker machine and the machine running the endpoint.

If you’re having a problem, I recommend creating a new post where you can provide details about the problem.