DP-420 Exam QuestionsBrowse all questions from this exam

DP-420 Exam - Question 87


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?

Show Answer
Correct Answer: D

To ensure that the function processes each upsert within one second, you should change the 'feedPollDelay' property. The 'feedPollDelay' determines the time delay in milliseconds between polling for new changes in the container. By reducing this delay from its default value of 5,000 milliseconds (5 seconds) to a value closer to 1,000 milliseconds (1 second), the function will poll for updates more frequently, allowing it to process upserts within the desired timeframe.

Discussion

4 comments
Sign in to comment
azuredemo2022threeOption: D
Jun 26, 2024

Answer

biglebowski88Option: C
Dec 15, 2024

setting maxItemsPerInvocation to 1 would ensure the function gets executed immediately and processed.

biglebowski88
Dec 15, 2024

if it has lots of upserts to deal with then it will kick off lots of function executions in parallel

3709334Option: D
Dec 26, 2024

Gets or sets the delay in between polling a partition for new changes on the feed, after all current changes are drained.

WimTSOption: D
Apr 16, 2025

The feedPollDelay property specifies the interval at which the Azure Functions runtime polls the Azure Cosmos DB change feed for new changes. By default, this interval is set to 5 seconds. Reducing this value allows your function to detect and process changes more promptly.​ Microsoft Learn +2 Anthony Chu +2 azure.github.io +2 Since upserts occur every three seconds and you aim for processing within one second, setting feedPollDelay to a value less than or equal to one second (e.g., "00:00:01") would be appropriate. This configuration ensures that the function checks for new changes at least every second, aligning with your processing requirements.