gpt4 book ai didi

azure - NimbusAPI 响应超时,尽管它说已收到

转载 作者:行者123 更新时间:2023-12-02 07:50:41 25 4
gpt4 key购买 nike

我正在使用NimbusAPI使用 Azure 服务总线。我在使用 Nimbus 获取请求/响应操作的响应时遇到问题。以下是单元测试的输出。我可以成功获取请求,在断点中单步执行它,并观察它返回响应。客户端,无论是单元测试、MVC 应用程序还是其他任何东西,总是会超时。下面输出中的倒数第二行显示实际收到了响应,但最后一行表示没有收到响应,并且已超时。

 12/17/2014 9:42:07 PM -05:00: Constructing bus... 12/17/2014 9:42:08
PM -05:00: Creating message pumps and subscriptions.
Nimbus.GarbageMan: Tracking
Nimbus.Infrastructure.RequestResponse.ResponseMessagePumpFactory
(Nimbus.Infrastructure.RequestResponse.ResponseMessagePumpFactory)
Nimbus.GarbageMan: Tracking
Nimbus.Infrastructure.MessageSendersAndReceivers.NimbusQueueMessageReceiver
(inputqueue.myapp.mypc) Nimbus.GarbageMan: Tracking
Nimbus.Infrastructure.MessagePump (Nimbus.Infrastructure.MessagePump)
Nimbus.GarbageMan: Tracking
Nimbus.Infrastructure.NimbusMessagingFactory
(Nimbus.Infrastructure.NimbusMessagingFactory) Nimbus.GarbageMan:
Tracking Nimbus.Infrastructure.Commands.CommandMessagePumpsFactory
(Nimbus.Infrastructure.Commands.CommandMessagePumpsFactory) 12/17/2014
9:42:08 PM -05:00: Creating command message pumps Nimbus.GarbageMan:
Tracking
Nimbus.Infrastructure.RequestResponse.RequestMessagePumpsFactory
(Nimbus.Infrastructure.RequestResponse.RequestMessagePumpsFactory)
12/17/2014 9:42:08 PM -05:00: Creating request message pumps
Nimbus.GarbageMan: Tracking
Nimbus.Infrastructure.RequestResponse.MulticastRequestMessagePumpsFactory
(Nimbus.Infrastructure.RequestResponse.MulticastRequestMessagePumpsFactory)
12/17/2014 9:42:08 PM -05:00: Creating multicast request message pumps
Nimbus.GarbageMan: Tracking
Nimbus.Infrastructure.Events.MulticastEventMessagePumpsFactory
(Nimbus.Infrastructure.Events.MulticastEventMessagePumpsFactory)
12/17/2014 9:42:08 PM -05:00: Creating multicast event message pumps
Nimbus.GarbageMan: Tracking
Nimbus.Infrastructure.Events.CompetingEventMessagePumpsFactory
(Nimbus.Infrastructure.Events.CompetingEventMessagePumpsFactory)
12/17/2014 9:42:08 PM -05:00: Creating competing event message pumps
12/17/2014 9:42:08 PM -05:00: Message pumps and subscriptions are all
created. 12/17/2014 9:42:08 PM -05:00: Bus built. Job done!
Nimbus.GarbageMan: Tracking
Nimbus.Infrastructure.MessageSendersAndReceivers.NimbusQueueMessageSender
(Nimbus.Infrastructure.MessageSendersAndReceivers.NimbusQueueMessageSender)
12/17/2014 9:42:08 PM -05:00: Sending request
Myapp.Messages.DoItRequest to
q.myapp.messages.doitrequest
[MessageId:bc1c79cc1965489c84703f5898bd6fd8,
CorrelationId:bc1c79cc1965489c84703f5898bd6fd8] 12/17/2014 9:42:08 PM
-05:00: Sent request Myapp.Messages.DoItRequest to q.myapp.messages.doitrequest
[MessageId:bc1c79cc1965489c84703f5898bd6fd8,
CorrelationId:bc1c79cc1965489c84703f5898bd6fd8] 12/17/2014 9:42:08 PM
-05:00: Waiting for response to Myapp.Messages.DoItRequest from
q.myapp.messages.doitrequest
[MessageId:bc1c79cc1965489c84703f5898bd6fd8,
CorrelationId:bc1c79cc1965489c84703f5898bd6fd8] 12/17/2014 9:42:08 PM
-05:00: Flushing outbound message queue q.myapp.messages.doitrequest (1 messages) 12/17/2014
9:42:08 PM -05:00: Received response to
Myapp.Messages.DoItRequest from
q.myapp.messages.doitrequest
[MessageId:bc1c79cc1965489c84703f5898bd6fd8,
CorrelationId:bc1c79cc1965489c84703f5898bd6fd8] in the form of
System.Threading.Tasks.Task`1[[Myapp.Messages.DoItResponse,
Myapp.Messages, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null]] 12/17/2014 9:42:08 PM -05:00: Fetching existing
queues... System.TimeoutException : No response was received from the
bus within the configured timeout. Expected a
'Myapp.Messages.DoItResponse'.

它说我收到了回复...

9:42:08 PM -05:00: **Received response to
Myapp.Messages.DoItRequest from
q.myapp.messages.doitrequest**
[MessageId:bc1c79cc1965489c84703f5898bd6fd8,
CorrelationId:bc1c79cc1965489c84703f5898bd6fd8] **in the form of
System.Threading.Tasks.Task`1[[Myapp.Messages.DoItResponse**,
Myapp.Messages, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null]] 12/17/2014

除了我没有

9:42:08 PM -05:00: Fetching existing
queues... System.TimeoutException : **No response was received from the
bus within the configured timeout. Expected a
'Myapp.Messages.DoItResponse'.**

我是否遗漏了什么需要检查的内容?

最佳答案

哦。我的。天哪。

看来我未能调用bus.Start();来实际启动总线。我创建/配置了总线,这似乎足以发送消息,但是显然需要 .Start(); 来实际订阅并观察返回的响应。这解释了为什么我可以在后端中断并看到正在创建的响应,甚至看到队列中的消息返回,但客户端的实际请求超时。

关于azure - NimbusAPI 响应超时,尽管它说已收到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27538574/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com