我参与了一个多层项目,其中一部分是使用来自第三方系统的“事件”流。供应商通过 Azure 服务总线主题发布这些 - 他们提供、控制和管理总线。我们只提供了 URI、TopicName 和订阅详细信息。
我们的方法是组合一个 Webjob,使用ServiceBusTrigger
SDK 中提供的功能来处理侦听新消息并触发将它们处理到我们的系统中。但是,我们似乎遇到了障碍,因为作业不断无法从主题中读取。这项工作以模糊的方式失败Timeout Exception
:
Unhandled Exception: System.TimeoutException: The timeout elapsed upon attempting to obtain a token while accessing 'https://****-sb.accesscontrol.windows.net/WRAPv0.9/'.
---> System.IdentityModel.Tokens.SecurityTokenException: The token provider was unable to provide a security token while accessing 'https://****-sb.accesscontrol.windows.net/WRAPv0.9/'.
Token provider returned message: 'The operation has timed out'.
但更进一步,跟踪包括:
[ERR] at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
[ERR] at Microsoft.ServiceBus.NamespaceManager.OnEndTopicExists(IAsyncResult result)
[ERR] at Microsoft.ServiceBus.NamespaceManager.EndTopicExists(IAsyncResult result)
供应商随后确认订阅对该主题的唯一许可/声明是Listen
任何人都可以确认许可要求是ServiceBusTrigger
什么?
作为+1,假设它出于某种原因需要更多Listen
(即需要Manage
),有人愿意提出替代方法吗?失去 WebJob 基础设施似乎是一种耻辱(该项目已经有 3 个其他工作)——尤其是失去了诸如主题消息的异步和并发处理之类的功能