Amy
Amy

Reputation: 11

Prototype project with RabbitMQ+RavenDB repeated SharedQueue closed errors from RabbitMQ

I've created a simple saga prototype project with RabbitMQ as the transport and RavenDB as the persistence mechanism. The prototype actually runs as expected, but every few seconds i get this error msg:

ERROR NServiceBus.Transports.RabbitMQ.RabbitMqDequeueStrategy Failed to receive messages from [Assembly].Retries System.AggregateException: One or more errors occurred. --> System.IO.EndOfStreamException: SharedQueue closed at RabbitMQ.Util.SharedQueue1.EnsureIsOpen() at RabbitMQ.Util.SharedQueue1.Dequeue(int 32 milliseconds timeout.......

I also get an almost identical message immediately following the above one but it says it Failed to receive messages from RabbitMGPoller.Timeouts

In addition to that there are constant INFO messages that say: NServiceBus.Transports.RabbitMQ.RabbitMqConnectionManager Disconnected from RabbitMQ broker, reason: AMQP close-reason, initiated Library, code=0 text="End of stream"... cause=System.IOException:Unable to write data to 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...

I have tried adding a DequeueTimeout=600 value to the transport connection, but the same errors still occur. I've also tried adding the following key in the config file, but it still didn't seem to help.

Upvotes: 1

Views: 243

Answers (1)

Amy
Amy

Reputation: 11

I eventually figured it out, just my lack of understanding of RabbitMQ and NServiceBus. I changed the RequestedHeartbeat value for the RabbitMQ connection to something larger i.e. RequestedHeartbeat=6000. That solved my issue.

Upvotes: 0

Related Questions