我有一个外部供应商希望我订阅他们的 Azure Web PubSub 服务,当某个事件发生时我将从该服务收到通知。从我自己的 Azure 环境订阅这些事件的最佳方式是什么?我熟悉处理来自 Azure Functions 和 Azure 逻辑应用的 HTTP 请求,但这是我第一次在 Azure 中使用 Websockets(而且我对 Azure 本身还是个新手)。
编辑:另外,我已经阅读了 Azure Web PubSub 上的文档,并遵循了一些教程。大多数都展示如何从 C# 控制台应用程序或 Web 应用程序订阅,但如果我想在收到通知时启动 Azure 中的工作流程该怎么办?
最佳答案
subscribe to their Azure Web PubSub service from which I will receive notifications when a certain event occurs
看起来您将扮演event handler upstream角色。您可以运行应用程序服务器并监听来自 Azure Web PubSub 服务的 CloudEvents HTTP 请求。 https://learn.microsoft.com/en-us/azure/azure-web-pubsub/reference-cloud-events
以下是有关处理事件的示例:https://learn.microsoft.com/en-us/azure/azure-web-pubsub/tutorial-build-chat?tabs=csharp#handle-events
关于azure - 从 Azure 订阅外部 Azure Web PubSub 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72564720/