gpt4 book ai didi

php - azure 队列服务php连接字符串

转载 作者:行者123 更新时间:2023-12-03 03:15:26 24 4
gpt4 key购买 nike

所以我想要一个脚本来连接到队列并检索消息。在 .NET 应用程序上,我使用以下字符串进行连接,一切运行良好:

sb://host.com/USER;StsEndpoint=https://host.com:9355/USER/;RuntimePort=9354;ManagementPort=9355;SharedSecretIssuer=USER;SharedSecretValue=XXX';

这是一个相当大的字符串,但在 .NET 中运行良好。然而,对于 php,我在 Azure php sdk 文档中注意到,连接字符串应具有以下格式:

DefaultEndpointsProtocol=[http|https];AccountName=[yourAccount];AccountKey=[yourKey]

我不知道如何将我拥有的大网址“翻译”为 php 所需的格式。我尝试了以下方法,但没有成功

DefaultEndpointsProtocol=https://host.com;AccountName=USER;AccountKey=XXX

有人知道连接字符串实际上应该是什么样子吗?提前致谢

最佳答案

我相信您正在混合两件事 - .Net 中的服务总线队列和 PHP 中的 Azure 存储队列。您尝试在 PHP 中使用的连接字符串用于存储队列。基于此处的文档:https://github.com/Azure/azure-sdk-for-php (请参阅“入门”部分),服务总线的连接字符串应采用以下格式:

Endpoint=[yourEndpoint];SharedSecretIssuer=[yourWrapAuthenticationName];SharedSecretValue=[yourWrapPassword]

Where the Endpoint is typically of the format https://[yourNamespace].servicebus.windows.net.

关于php - azure 队列服务php连接字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27968058/

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