簡體   English   中英

Azure Cosmos DB- 僅針對使用 Azure 函數的特定值觸發更改饋送

[英]Azure Cosmos DB- Trigger Change Feed only for specific values using Azure Functions

我們想在 Cosmos DB 更改提要上觸發 Azure Function,但僅當有特定值插入到 cosmos DB 時。

例如。 這是我們存儲到 cosmos DB 中的 json 樣本。

{
    "EventGuid": "3ecab093-564e-4642-9e5c-097ab89a03c9",
    "NotificationType": 11,
    "NotificationTypeDesc": "CardGroupChanged",
    "UserUUId": "06db4897-e63a-4be7-bd24-c5b59749a5b3",
    "GroupName": null,
    "Payer": "CZ00001927",
    "Account": "CZ00001927",
    "Status": 3,
    "StatusDesc": "Sent",
    "Created": "2020-04-24T15:46:43.5109248Z",
    "Updated": null,
    "SubscriptionId": "02071132-1927-4be7-bd24-c5b59749a5b3",
    "SubscriptionAction": 2,
    "SubscriptionActionDesc": "Email",
    "DistributionType": 1,
    "DistributionTypeDesc": "Single",
    "ReadBy": null,
    "PayerName": "Gabbar Singh Pvt Ltd",
    "AccountName": "Samba Roadways"
}

僅當SubscriptionAction的值為 2 時,我可以使用 Azure 函數觸發 cosmos db 更改提要嗎?

簡短的回答是否定的。 確定何時做某事所需的邏輯和計算必須在 Azure Function 本身內。 Cosmos DB 本身沒有確定何時觸發更改源的機制。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM