nerdexam
Microsoft

DP-420 · Question #65

Container2 is a container in an Azure Cosmos DB Core (SQL) API account where Upserts of items happen every three seconds. You are having an Azure Functions application named function2 that is…

The correct answer is B. FeedPollDelay. The correct answer is B: FeedPollDelay. The Azure Functions Cosmos DB trigger uses the change feed to detect new or modified items. The FeedPollDelay property in function.json specifies the delay (in milliseconds) between polling the change feed when no new changes are found…

Integrate an Azure Cosmos DB solution

Question

Container2 is a container in an Azure Cosmos DB Core (SQL) API account where Upserts of items happen every three seconds. You are having an Azure Functions application named function2 that is expected to run whenever the items are replaced or inserted in container2. You notice that function2 runs, but not on each upsert. You need to make sure that each upsert is processed by function2 within 1 second of the upsert. Which of the following property should you modify in the Function.json file of function2?

Options

  • AMaxItemsPerInvocation
  • BFeedPollDelay
  • CCheckpointInterval
  • DleaseCollectionsThroughput

How the community answered

(56 responses)
  • A
    7% (4)
  • B
    75% (42)
  • C
    13% (7)
  • D
    5% (3)

Explanation

The correct answer is B: FeedPollDelay. The Azure Functions Cosmos DB trigger uses the change feed to detect new or modified items. The FeedPollDelay property in function.json specifies the delay (in milliseconds) between polling the change feed when no new changes are found. By default this is 5000ms (5 seconds), which explains why function2 doesn't run on every upsert. Setting FeedPollDelay to 1000 (1 second) or lower ensures the trigger checks for new changes frequently enough to process each upsert within the 1-second requirement. Option A (MaxItemsPerInvocation) limits documents per invocation. Option C (CheckpointInterval) controls checkpoint frequency. Option D (leaseCollectionsThroughput) sets RUs for the lease collection - none of these affect polling frequency.

Topics

#Azure Functions#Cosmos DB Change Feed#Real-time processing#Trigger configuration

Community Discussion

No community discussion yet for this question.

Full DP-420 Practice