Is it possible get feed on the logical partition instead of whole container

Thangavel Daniel Tamilarasan 271 Reputation points


Is it possible get feed on the logical partition instead of whole container in Azure function ?

        public void Run([CosmosDBTrigger(  
            databaseName: "db_test",  
            collectionName: "testcontainer",  
            ConnectionStringSetting = "db_DOCUMENTDB",  
            LeaseCollectionName = "leases",  
            CreateLeaseCollectionIfNotExists =true)] IReadOnlyList<MyDocument> input)  
            if (input != null && input.Count > 0)  
                _logger.LogInformation("Documents modified: " + input.Count);  
                _logger.LogInformation("First document Id: " + input[0].Id);  

Please suggest

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
3,724 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,272 questions
0 comments No comments
{count} votes

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 18,421 Reputation points

    @Thangavel Daniel Tamilarasan Thank you for reaching out to Microsoft Q&A. Unfortunately, Change Feed for a partition is not possible using Functions Trigger.

    Azure Functions use Change Feed Processor (refer which doesn't support reading from a single partition. Check docs for the below info:


    If you are in need of this feature, I would recommend you submit feedback directly with Cosmos DB product team via Azure Cosmos DB feedback. Others can also upvote the feature with similar interests. Alternatively, you can explore Change feed pull model which supports reading changes from a particular partition key and let us know if any questions.

    I hope this answers your question and feel free to add a comment if you have any other questions. We would be happy to assist you. Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community.

    0 comments No comments

0 additional answers

Sort by: Most helpful