azure-cosmos-db-emulator-docker icon indicating copy to clipboard operation
azure-cosmos-db-emulator-docker copied to clipboard

ChangeFeedProcessor support request

Open david-cag opened this issue 9 months ago • 4 comments

Is your feature request related to a problem? Please describe. We currently uses change feed features in CosmosDB cloud service and we wanted to validate our tests againts a local cosmosdb instance but @TheovanKraay answered us in this ticket that is not currently supported: https://github.com/Azure/azure-sdk-for-java/issues/44393#issuecomment-2682094315

Describe the solution you'd like Same behaviour as Azure CosmosDB cloud instance. Transparent management of continuationTokens.

Describe alternatives you've considered We have holded docker instance usage for testing pourposes due this feature block us our business flow scenarios but with the proper guidance we are open to look for a way to mitigate continuation token errors (although change events will continue to be ignored).

Setup (please complete the following information):

  • OS: Windows 11
  • IDE: IntelliJ
  • Library/Libraries: [ com.azure:azure-spring-data-cosmos:5.20.0
  • Java version: [21.0.4]
  • Frameworks: [SpringBoot 3.3.9]
  • Image: CosmosDB Emulator (vnext-preview)

david-cag avatar Feb 27 '25 13:02 david-cag

Currently, the Cosmos DB Emulator does not support the change feed feature, as confirmed in Azure/azure-sdk-for-java#44393.

To resolve this, the recommended approach is to use an Azure Cosmos DB instance in a test environment, as it fully supports the change feed functionality, including continuation tokens.

If using the cloud instance is not feasible, an alternative is to manually handle continuation tokens and implement a polling mechanism for detecting changes. However, this may not fully replicate the behavior of the change feed in the cloud.

Would appreciate any updates on future support for this in the emulator.

UKR555 avatar Feb 27 '25 13:02 UKR555

@UKR555 The point of this post is to request support. I think @david-cag is well aware it's not supported. Is there any roadmap to add this support?

MattHartz avatar Mar 28 '25 17:03 MattHartz

@MattHartz @david-cag There is a separate issue #152 on change feed support, is that the same request as this? There are details on timeline in that issue. Will be interesting to see if covers all consumption types of the change feed or only specific use cases.

trulsmp avatar Apr 04 '25 06:04 trulsmp

Hi! It's close related to that ticket. We both require ChangeFeedSupport but as I described in the alternatives we could mitigate our problems (discarding change feed functionality) if we find a way to mitigate continuation token errors (although change events will continue to be ignored).

david-cag avatar Apr 04 '25 06:04 david-cag

@trulsmp @david-cag @MattHartz @UKR555

Hi all, in case you missed it, we released a version late last month which supports change feed. I would recommend you to give it a try and feedback is welcome. This is the release note: https://github.com/Azure/azure-cosmos-db-emulator-docker/releases/tag/EN20250425

lionelc avatar May 20 '25 16:05 lionelc