We are using Cosmos Changefeed listeners to update the edge cache in ephemeral java services. That means, all the arbitrary number of instances should receive every changefeed. We used UUID as the "hostname" but not all instances are getting the changefeed. I read somewhere there is leasePrefix. Will that work? If so how to do that on Java side of things?
How to have multiple instances of changefeed listeners get the same message: Java
955 Views Asked by so-random-dude At
1
There are 1 best solutions below
Related Questions in AZURE
- Why does Azure Auto-Scale scale go lower then minimum amount of instances?
- Data execution plan ended with error on DB restore
- Why does Azure CloudConfigurationManager.GetSetting return null
- Do I need other roles than Worker Role for a web site and service layer in Azure?
- Azure Web App PATH Variable Modification
- Azure Data Factory: LinkedService for AzureSql in failed state
- How To Update a Web Application In Azure and Keep The App Up the whole time
- Using Azure MobileServices library with my own LAN WebApi
- ionCube loader error on Azure IIS
- App crash (if closed) after click on notification
- How to get sql data bases instances in azure using java api
- I want to create file in azure share using python PUT requests but getting error signature not correct including headers
- Enabling OPTIONS method on Azure Cloud Service (to enable CORS)
- Redirecting subdomain to directory on Azure
- Kaltura account settings error
Related Questions in AZURE-COSMOSDB
- Not getting Downloaded - "Azure DocumentDB Data Migration Tool"
- createUserDefinedFunction : if already exists?
- Exporting data from Azure DocumentDB
- NodeJS, DocumentDB (Via Docooment) Bulk Insert
- Issue on Azure DocumentDB and Hive integrations on HDInsight using Microsoft Hive ODBC driver
- Using reserved word field name in DocumentDB
- Fire trigger from DocumentDB stored procedure
- How to you use Azure documentdb using php
- DocumentDB IN keyword with Linq
- C# - How do I get an anonymous type and then use the same selector to create an object?
- DocumentDb - query on nested document and root level
- DocumentDB TransientFaultHandling Best Practice
- DocumentDb and floating point truncation
- DocumentDB Change Feed - How to see all changes to a document
- How does DocumentDB changefeed support resume/continuation?
Related Questions in AZURE-COSMOSDB-SQLAPI
- filtering by unknown property names
- SSIS fails to insert new document
- Azure SDK limiting maximum autoscale provisioned throughput to 100k
- Better option to alter Azure cosmos db documents in PROD
- How to have multiple instances of changefeed listeners get the same message: Java
- Filtering out array items in a CosmosDB query with best performance
- Is there a reason why not model social network with SQL API?
- Azure CosmosDb continuation token for SELECT with JOIN
- Cosmos DB query MIN function to get the smallest id
- CosmosDB Partition and Update attributes
- Query SQL API in CosmosDB using C#
- How to show sql Queries in console in springboot azure (Springboot + Azure Cosmos)
- Count items with query using readItems(queryString)
- Why does my Azure Cosmos DB SQL API Container Refuse Multiple Items With Same Partition Key Value?
- cosmos db nested query with geometry locations
Related Questions in AZURE-JAVA-SDK
- Retrieve List of networks for a subscription in windows azure with azure java sdk
- where does the virtual machine files are stored in Windows Azure and how to retrieve them with Azure SDK?
- Azure: Cannot specify storage account while creating a new UN - managed disk for azure.
- Issue with Listing Subscriptions by ResourceManager Java SDK
- Map a war to root - JAVA Azure web role
- How to have multiple instances of changefeed listeners get the same message: Java
- Azure sdk for Java How to Setup User Delegation Key and Shared Authentication Signatures SAS
- How to ensure a blob filename is unique on Azure Storage
- Delete files in batch from azure blob storage using service account
- How to refresh access token provided by TokenCredential / ClientSecretCredential by Azure Identity Java SDK?
- Azure App Configuration Feature Management
- In azure how to create a VM with deployment
- Azure Data Factory Java SDK build dataset with Azure Data Explorer (Kusto) query
- Failed to execute goal com.microsoft.azure:azure-functions-maven-plugin:1.28.0
- Azure Open AI bring your own data feature returning error on getChatCompletions call: "Functions are not supported at this time."
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes,
Lease prefixwill help you in this case. A scenario where you want to do multiple things whenever there is a new event in a particular Azure Cosmos container. If actions you want to trigger, are independent from one another, the ideal solution would be to create one listener for Cosmos DB per action you want to do, all listening for changes on the same Azure Cosmos container.Given the requirements of the listeners for Cosmos DB, we need a second container to store state, also called, the leases container. Does this mean that you need a separate leases container for each Azure Function?
Here, you have two options:
Create one
leases containerper Listener: This approach can translate into additional costs, unless you're using a shared throughput database. Remember, that the minimum throughput at the container level is 400 Request Units, and in the case of the leases container, it is only being used to checkpoint the progress and maintain state.Have one lease container and share it for all your Listeners: This second option makes better use of the provisioned Request Units on the container, as it enables multiple Listeners to share and use the same provisioned throughput.
Here is an example of Function App to implement this in Java Language: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2-trigger?tabs=java
Code for quick reference: