'Unexpected Exception' after upgrading EasyNetQ 3.4.5 to Latest 6.3.1

320 Views Asked by At

After upgrading the EasyNetQ package to 6.3.1 I get the below error. Code was running on version 3.4.5

The AMQP operation was interrupted: AMQP close-reason, initiated by Library, code=541, text='Unexpected Exception', classId=0, methodId=0, cause=System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.IO.BufferedStream.ReadByte()
   at RabbitMQ.Client.Impl.InboundFrame.ReadFrom(Stream reader, Byte[] frameHeaderBuffer) in /_/projects/RabbitMQ.Client/client/impl/Frame.cs:line 222
   at RabbitMQ.Client.Impl.SocketFrameHandler.ReadFrame() in /_/projects/RabbitMQ.Client/client/impl/SocketFrameHandler.cs:line 220
   at RabbitMQ.Client.Framing.Impl.Connection.MainLoopIteration() in /_/projects/RabbitMQ.Client/client/impl/Connection.cs:line 557
   at RabbitMQ.Client.Framing.Impl.Connection.MainLoop() in /_/projects/RabbitMQ.Client/client/impl/Connection.cs:line 499

Code errors on line autoSubscriber.Subscribe(new []{ assembly }); below.

var autoSubscriber = new AutoSubscriber(_bus, "Workers")
            {
                AutoSubscriberMessageDispatcher = _dispatcher
            };
            var assembly = GetType().Assembly;

            autoSubscriber.Subscribe(new []{ assembly });

I have checked the RabbitMQ management portal and there aren't any connections. My connection string is host=localhost;virtualHost=DEV

0

There are 0 best solutions below