gpt4 book ai didi

java - 如何实现 azure 服务总线队列触发器/存储连接错误

转载 作者:行者123 更新时间:2023-12-04 20:55:17 24 4
gpt4 key购买 nike

我想从azure中的服务总线队列获取消息,对于除HttpTrigger和kafkaTrigger之外的所有触发器,我需要在本地设置中为AzureWebJobsStorage指定一个值(连接字符串)。我在 azure 中部署了一个 blob 存储,因此我获取了存储帐户的连接字符串并将其放入 loca.settings.json

    {
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "java",
"AzureWebJobsStorage" : "DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=xxx;EndpointSuffix=core.windows.net",
"myConnection" : "<Connection string>"
}
}

但我从 azure 得到一个异常(exception)

The 'messageReceiver' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.messageReceiver'. Microsoft.WindowsAzure.Storage: No valid combination of account information found.

我检查了多次连接字符串是正确的。他们说我需要删除端点后缀,但这不起作用。预先感谢您。

最佳答案

Azure Function 存储帐户要求

When creating a function app, you must create or link to a general-purpose Azure Storage account that supports Blob, Queue, and Table storage. This is because Functions relies on Azure Storage for operations such as managing triggers and logging function executions. Some storage accounts don't support queues and tables. These accounts include blob-only storage accounts, Azure Premium Storage, and general-purpose storage accounts with ZRS replication. These unsupported accounts are filtered out of from the Storage Account blade when creating a function app. detailhere

您可以使用local storage account ,如果您使用的是 Windows 10 计算机

关于java - 如何实现 azure 服务总线队列触发器/存储连接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61056760/

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