功能无法启动。 Microsoft.Azure.DocumentDB.Core:必须为此操作提供PartitionKey值。

问题描述 投票:0回答:1
我有一个简单的天蓝色函数宇宙触发器设置,如下所示:

{ "bindings": [ { "type": "cosmosDBTrigger", "name": "documents", "direction": "in", "leaseCollectionName": "leases", "connectionStringSetting": "DbConnectionString", "databaseName": "mydb", "collectionName": "mycollection", "createLeaseCollectionIfNotExists": "true" } ], "scriptFile": "../dist/TestCosmosTrigger/index.js" }

当我运行函数时出现错误:

函数'Functions.FeedNotifier'的侦听器无法开始。 Microsoft.Azure.Documents.ChangeFeedProcessor:主机已经初始化。

我确实尝试向分区添加一个partitionKey字段,但无济于事。

我有一个简单的天蓝色函数cosmos触发器设置,如下所示:{“” bindings“:[{” type“:” cosmosDBTrigger“,” name“:” documents“,” direction“:” in“,” leaseCollectionName“ :...

node.js typescript azure azure-functions azure-cosmosdb
1个回答
0
投票
似乎与此issue相关。尝试使用single-partition lease collection,还提到了here
© www.soinside.com 2019 - 2024. All rights reserved.