I have a simple azure function cosmos trigger set up, like so:
{
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "documents",
"direction": "in",
"leaseCollectionName": "leases",
"connectionStringSetting": "DbConnectionString",
"databaseName": "mydb",
"collectionName": "mycollection",
"createLeaseCollectionIfNotExists": "true"
}
],
"scriptFile": "../dist/TestCosmosTrigger/index.js"
}
When I run the function I get an error:
The listener for function 'Functions.FeedNotifier' was unable to start. Microsoft.Azure.Documents.ChangeFeedProcessor: Host was already initialized.
I did try to add a partitionKey field to th ebindings to no avail.
Please update to the latest Microsoft.Azure.WebJobs.Extensions.CosmosDB
dependency package .
This error either means you have a partitioned leases collection that is not partitioned by /id
or you are using an old extension version.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.