Learn how to ensure your Azure Functions process Cosmos DB changes within seconds by adjusting the feedPollDelay property in the Function.json file. Improve performance and responsiveness of your cloud-native applications.
Table of Contents
Question
You have a container named container1 in an Azure Cosmos DB Core (SQL) API account. Upserts of items in container1 occur every three seconds.
You have an Azure Functions app named function1 that is supposed to run whenever items are inserted or replaced in container1.
You discover that function1 runs, but not on every upsert.
You need to ensure that function1 processes each upsert within one second of the upsert.
Which property should you change in the Function.json file of function1?
A. checkpointInterval
B. leaseCollectionsThroughput
C. maxItemsPerInvocation
D. feedPollDelay
Answer
D. feedPollDelay
Explanation
This setting controls the interval at which the Azure Function checks for new changes in the Cosmos DB Change Feed. By reducing this value, you can ensure that the function responds to upserts more quickly.
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB DP-420 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB DP-420 exam and earn Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB DP-420 certification.