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.

ChangeFeedProcessor API and Resource Tokens

See original GitHub issue

In using the ChangeFeedProcessor.StartAsync(), we have run into a 403 issue "Insufficient permissions provided in the authorization header for the corresponding request. Please retry with another authorization header. ActivityId: 250e7411-d830-4fcf-b82a-0dd654a1c62b, " The issue is due to the StartAsync() call making a GET request scoped to a CosmosDB database, not collection. D:\dbs\el\csdb;\Product\Cosmos\RoutingGateway\Runtime\RequestHandlers\AddressRequestHandler.cs:line 57" Argument5="changefeedtokentest" Argument6="AddressFeedQuery" Argument7="GET" TraceSource="DocDBTrace"

My question: is the change feed processor SDK not capable of working with resource tokens? We have thus far been able to use resource tokens to instantiate 1 CosmosClient per token and do operations using 1 CosmosClient per collection. Given that we pass collections via CosmosClient.GetContainer() calls as part of ChangeFeedProcessor’s Build(), I would expect operations on the monitored, lease, and target collections to work.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:39 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
oiqwrwer1commented, Nov 18, 2022

Great, I tested the fix locally and confirmed it works for our workflows. Thank you!

1reaction
ealsurcommented, Nov 17, 2022

You can fork the repo (the fix is already in master) and test it, the linked PR already has an end to end test using Resource Token (not mocks) that mirrors the scenario and it’s working/passing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change feed processor in Azure Cosmos DB
Learn how to use the Azure Cosmos DB change feed processor to read the change feed, and learn about the components of the...
Read more >
Azure Cosmos DB .NET change feed Processor API, SDK ...
Learn all about the Change Feed Processor API and SDK including release dates, retirement dates, and changes made between each version of ...
Read more >
Azure/azure-documentdb-changefeedprocessor-dotnet
This library provides a host for distributing change feed events in partitioned collection across multiple observers. Instances of the host can scale up...
Read more >
Learn Live - Consume an Azure Cosmos DB SQL API change ...
Learning objectives - Create a change feed processor in the . ... Cosmos DB SQL API SDK 36:14 - Implement a delegate for...
Read more >
First steps of the Change Feed pull model in Azure ...
The pull model is a very thin API compared to the Change Feed Processor, but allows developers to have more control and flexibility....
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