question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feedIterator.HasMoreResults always returns false in Azure

See original GitHub issue

I am trying to get the pull model of the change feed working as described here.

https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed-pull-model

                using (var feedIterator = _container.GetChangeFeedIterator<NotificationRequestItemDbContainer>(ChangeFeedStartFrom.Time(startUtc)))
                {
                    while (feedIterator.HasMoreResults)
                    {
                        cancellationToken.ThrowIfCancellationRequested();

                        try
                        {
                            var matchedChanges = (await feedIterator.ReadNextAsync(cancellationToken))

I am using version 3.15.2-preview of the .net sdk. When I use this code against my local emulator everything works fine. HasMoreResults is always true as described in the documentation. However when I use a cosmos DB hosted in azure, the HasMoreResults returns false immediately. Even I loop and wait for HasMoreResults to be true it will never return any results. I know the connection and the container are fine because I can query the data fine with a GetItemQueryIterator.

Am I missing some setup to get the change feed to work in azure?

_Originally posted by @Daniel-Guenter in https://github.com/Azure/azure-cosmos-dotnet-v3/discussions/2095_

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ealsurcommented, Jan 4, 2021

Verified 3.15.2 also throws the excepted exception, the problem are the docs, so I sent https://github.com/MicrosoftDocs/azure-docs-pr/pull/142108

0reactions
ealsurcommented, Jan 4, 2021

Docs were updated, should be deployed live in the next 24hs

Read more comments on GitHub >

github_iconTop Results From Across the Web

feedIterator.HasMoreResults is true but ...
As per my understanding, you are facing issue when testing command to Azure Cosmos DB you are seeing feedIterator.HasMoreResults is true and ...
Read more >
ChangeFeedIterator.HasMoreResults returns true even all ...
After get FeedIterator from GetChangeFeedIterator api, the HasMoreResults always return as true even all the change feeds returned.
Read more >
Azure Cosmos DB: is it always necessary to check for ...
As a developer, we need to perform HasMoreResults Boolean check on DocumentClient object. If HasMoreResults is true then we can get more records ......
Read more >
How To Fix The FeedIterator.ReadNextAsync Response ...
In this blog, I will show how to resolve the issue with the response not returning when using the await command on the...
Read more >
Understanding CosmosDB Continuation Tokens ...
All the developer needs to do is check the HasMoreResults boolean on the DocumentClient object. If HasMoreResults is true, there is an ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found