EasyNetQ发布错误:消息:System.TimeoutException:发布者在等待序列号的ACK或NACK 4秒后确认超时

问题描述

在生产环境中(RabbitMQ,Publisher控制台应用程序,在Azure中的同一VM中运行的订阅者控制台应用程序),我们始终看到此错误。 在dev / qa环境中看不到它。 我已经在Google的RabbitMQ和EasyNetQ组上发布了这个问题。

兔子MQ设置

  • RabbitMQ:3.8.3。
  • Erlang:22.3
  • EasyNetQ:3.6.0

EasyNetQ设置

持久消息,PublishConfirm,持久队列

<add key="Queue.ConnectionString" value="host=localhost;virtualHost=/; username=guest; password=guest;timeout=5; publisherConfirms=true" />
        _exchange = _advancedBus.ExchangeDeclare(exchange,ExchangeType.Topic,durable: true);
        _messageQueue = _advancedBus.QueueDeclare(queue,durable: true);

天蓝色设置

  • 在Azure中运行的Windows Server 2019 VM:标准D16s v3(16 vcpus,64 GiB内存)
  • Datadisk:500个高级SSD驱动器

问题上下文

Here,它表示“发布确认”是来自代理的确认,即邮件已持久保存到磁盘。 如果是这样,则EasynetQ的连接字符串中的超时与此有关。 另外,我们将其设置为5秒,如您在连接字符串中在上面看到的那样,但是正如您在下面的日志中看到的那样,它说它在等待ACK或NACK 4秒钟后超时。我很困惑。

错误说明

我们经常在生产环境中出现此错误

11/4/2020 6:50 AM: Message:System.TimeoutException: Publisher confirms timed out after 4 seconds waiting for ACK or NACK from sequence number 240019
   at EasyNetQ.Producer.PublishConfirmationWaiter.Wait(TimeSpan timeout)
   at EasyNetQ.RabbitAdvancedBus.Publish(IExchange exchange,String routingKey,Boolean mandatory,MessageProperties messageProperties,Byte[] body)

11/4/2020 6:50 AM: Message:System.TimeoutException: Publisher confirms timed out after 4 seconds waiting for ACK or NACK from sequence number 240017
   at EasyNetQ.Producer.PublishConfirmationWaiter.Wait(TimeSpan timeout)
   at EasyNetQ.RabbitAdvancedBus.Publish(IExchange exchange,Byte[] body)

当我查看RabbitMq日志时,我看到了。

2020-11-03 20:16:03.373 [error] <0.706.0> handle.exe output did not contain a line beginning with '  File ',unable to determine used file descriptor count: "
Nthandle v4.22 - Handle viewer
copyright (C) 1997-2019 Mark Russinovich
Sysinternals - www.sysinternals.com
Handle type summary:
  ALPC Port       : 1
  Desktop         : 1
  Directory       : 2
  EtwRegistration : 41
  Event           : 273
  Event           : 55
  Event           : 1
  IoCompletion    : 3
  IRTimer         : 4
  Key             : 8
  Process         : 4
  Semaphore       : 12
  Thread          : 81
  TpWorkerFactory : 2
  WaitCompletionPacket: 5
  WindowStation   : 2
Total handles: 495
"

我不是专家。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)