gpt4 book ai didi

Azure 由内而外的连接

转载 作者:行者123 更新时间:2023-12-03 02:10:46 25 4
gpt4 key购买 nike

我正在努力将我的本地应用程序连接到 Azure 逻辑应用程序。这里的问题是我的网络不接受任何入站调用,但无论如何也不限制出站调用,因此我必须从内到外打开连接。

在当前状态下,我有逻辑应用程序,它最终应该对我的本地托管 Web API 进行 HTTP 调用,但由于上述原因,这是一个行不通的解决方案。

我的想法之一是创建 Azure SignalR 服务,从网络内部连接到它并等待消息。为此,我还必须创建代理 Azure 函数以从逻辑应用程序获取请求并将其广播到 SignalR - 我对 Azure 不太熟练,但这对我来说看起来不太合适。

另一个想法是使用 Azure 消息队列,但随后我必须按计划运行来读取消息,而要求之一是具有实时连接。

对于创建从 .Net 客户端到 Azure 的连接的最佳方式,您还有其他想法吗?要求如下:消息必须源自逻辑应用程序,连接必须是从防火墙内部到外部,消息必须实时接收,无法引入新的防火墙规则。

最佳答案

消息队列似乎很合适。使用 Azure 存储队列时,您确实需要轮询新消息。但是,Azure 服务总线队列推送消息,如the docs所述。 :

As a solution architect/developer, you should consider using Service Bus queues when:
[...]
Your solution needs to receive messages without having to poll the queue. With Service Bus, you can achieve it by using a long-polling receive operation using the TCP-based protocols that Service Bus supports.

我已成功使用 Azure 服务总线队列进行近实时通信,因此这绝对是可能的。

关于Azure 由内而外的连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73443992/

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