Home > Enterprise >  Using Cosmos change feed triggered Function, is it possible to get whole transaction documents toget
Using Cosmos change feed triggered Function, is it possible to get whole transaction documents toget

Time:10-28

Given I save two documents within the same logical partition and in one transaction to Cosmos, and I have an Azure Function triggered by the change feed, would those two documents always arrive in the Function documents collection together? Or could they be split over two invocations of the Function?

CodePudding user response:

Based on this comment on the Screenshot of MaxItemsPerInvocation configuration setting

transaction scope is preserved when reading items from the change feed.

They should arrive together in the same batch because they have the same transaction number, unless the transaction is bigger than 4Mb which is the maximum response size, in which case they could be split into multiple responses.

  • Related