gpt4 book ai didi

c# - Azure 上的信号器 : service bus required for calling a single client?

转载 作者:行者123 更新时间:2023-11-30 19:11:27 24 4
gpt4 key购买 nike

我了解到 Azure 上的 Signalr 需要服务总线实现(例如 https://github.com/SignalR/SignalR/wiki/Azure-service-bus )以实现可扩展性。

但是,我的服务器仅对单个客户端(调用者)进行回调:

// Invoke a method on the calling client
Caller.addMessage(data);

如果不需要Signalr的广播功能,还需要底层服务总线吗?

最佳答案

服务总线依赖项并非 Azure 特有的。每当您有多个服务器在运行时,您的一些 signalR 客户端就会创建与特定服务器的连接。如果您想让多个服务器保持同步,则需要处理服务器到服务器的实时通信。服务总线的发布-订阅模型很好地满足了这一要求。

dfowleR lists a specific case of this in the comments. Make sure you read down that far!

如果您在单个服务器上运行(Azure 上没有 sla),signalR 将在云服务 Web 角色以及新的 Azure 网站上正常工作。我做了一个screencast在这个简单的场景中,不依赖服务总线,而是仅在单个服务器上运行。

关于c# - Azure 上的信号器 : service bus required for calling a single client?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11491104/

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