How to use bulk operations efficiently in cosmosdb with java MongoAPI?

949 views Asked by At

I'm trying to deal with bulk CRUD operations using java sdk for mongo API in cosmos db (like repository.saveAll(query), repository.deleteAll())).

By using these operations , the amount of RU's consumption is getting increased and finally it is giving rate limit error. Forcefully, for these operations I need to increase number of RU's for the container just to make the query successful.

Is there any way to deal with bulk operations without increasing the RU's ?

1

There are 1 answers

2
Harshita Singh On

You are probably looking for Bulk Executor library for Mongo API of Cosmos DB. Unfortunately, this feature is not out yet:

enter image description here

Doc URL: https://learn.microsoft.com/en-us/azure/cosmos-db/bulk-executor-java