visual-studio-2017 - Azure 服务总线触发器队列未在本地调试中命中代码

标签 visual-studio-2017 azure-functions azureservicebus azure-servicebus-queues service-bus-explorer

使用服务总线触发器创建 Azure 函数并部署在 Azure 门户中。使用 servicebusexplorer,将队列发送到门户并正常工作。但是在azure中停止该功能后,将消息从资源管理器发送到visual studio中的本地代码进行调试。但是它没有火。
我在 local.settings.json 中给出了服务连接字符串,队列名称是正确的。从 visual studio 运行函数后,它在 azure CLI 中抛出错误。

错误:

MessageReceiver error (Action=Receive, ClientId=MessageReq.queue, Endpoint=sss-bbbb.servicebus.windows.net)xxxxx.queue, EntityPath=sss.ccccc
Microsoft.Azure.ServiceBus: 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 ErrorCode: TimedOut. System.Private.CoreLib: 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.

local.settings.json

   {    
        "IsEncrypted": false,    
      "Values":     
     {     
          "AzureWebJobsStorage": "UseDevelopmentStorage=true",     
          "AzureWebJobsDashboard": "UseDevelopmentStorage=true",    
          "FUNCTIONS_WORKER_RUNTIME": "dotnet",     
          "ServiceBusConnectionString": "Endpoint=//",    
          "RequestTimeout": "600000"    
      }      

最佳答案

我遇到过类似的问题,公司防火墙阻止了服务总线流量。 我将 TransportType=AmqpWebSockets 附加到我的连接字符串的末尾并且它起作用了。

关于visual-studio-2017 - Azure 服务总线触发器队列未在本地调试中命中代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57921818/

相关文章:

visual-studio-2017 - Visual Studio 2017 重置设置

azure - 从 azure 函数门户连接 localhost 数据库

azure - FTP/BlobStorage 触发器到 Azure 函数应用程序/逻辑应用程序

.net - 从 Azure 服务上的服务总线处理程序接收事件网格

azure - NServiceBus 事件订阅不适用于 Azure 服务总线

javascript - 从 Visual Studio 2017 任务列表中排除文件夹

asp.net-mvc - 应用程序不自动创建 AccountController

typescript - Visual Studio 2017 Asp.Net Core 2.1 TypeScript Vue 设置 - 不是 SPA

linux - 我的 azure functionapp 可以在 Linux 上运行吗?

azure - Azure.Messaging.ServiceBus 的 ServiceBusClient 类的 token 到期时间