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
959 views Asked by so-random-dude At
1
There are 1 answers
Related Questions in AZURE
- How to update to the latest external Git in Azure Web App?
- I need an azure product that executes my intensive ffmpeg command then dies, and i only get charged for the delta. Any Tips?
- Inject AsyncCollector into a service
- mutual tls authentication between app service and function app
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Application settings for production deployment slot in Azure App Services
- Encountered an error (ServiceUnavailable) from host runtime on Azure Function App
- Implementing Incremental consent when using both application and delegated permissions
- Invalid format for email address in WordPress on Azure app service
- Producer Batching Service Bus Vs Kafka
- Integrating Angular External IP with ClusterIP of .NET microservices on AKS
- Difficulty creating a data pipeline with Fabric Datafactory using REST
- Azure Batch for Excel VBA
- How to authenticate only Local and Guest users in Azure AD B2C and add custom claims in token?
- Azure Scale Sets and Parallel Jobs
Related Questions in AZURE-COSMOSDB
- How to enable log to console Cosmos Client SDK requests
- Fetch non-structured data in Synapse for Cosmos DB NoSQL?
- How to handle multiple cosmos db accounts with a single cosmosclient. Questions on multi tenancy
- SQL Query not returning expected output from cosmos container
- How is `Task` run only when awaited in C#?
- Rust return a result from a function
- getting : 'The SSL connection could not be established, see inner exception.' with cosmosclient.CreateDatabaseIfNotExistsAsync method
- Error creating CosmosDB Mongo Collections via bicep
- How to connect to 2 different cosmos Databases in Java?
- Cosmos Deserializes On ReadItemAsync Even Through No Results
- What lifetime does continuationToken have in Azure CosmosDB?
- Azure RBAC permission to write Cosmos DB index policy but not create container
- cosmos Change feed listener in java
- Impact of number of physical partitions on Cosmos DB performance
- How to insert-or-replace an entity in Cosmos DB atomically?
Related Questions in AZURE-COSMOSDB-SQLAPI
- How to handle multiple cosmos db accounts with a single cosmosclient. Questions on multi tenancy
- SQL Query not returning expected output from cosmos container
- Cosmos Deserializes On ReadItemAsync Even Through No Results
- Facing issue to create Cosmos Db using .NET core SDK
- Unable to import and export large data volume to or from cosmos DB container
- What is the most efficient way to get count of records in Cosmos query?
- connection is insufficiently secured Error in Azure cosmos DB Data Migration tool
- Find count greater than 1 in Azure CosmosDB
- Update several hundred documents in Cosmos Db
- Cosmos DB (NO SQL API) - ordering by Index_of
- Select first item in each GROUP BY in Cosmos
- What is the most efficient way to query an array using values from another array using SQL?
- Bulk writing in Azure Cosmos DB Java SDK
- Cant insert any data when hierarchial partition key is involved
- Azure cosmos dynamic query
Related Questions in AZURE-JAVA-SDK
- Having trouble implementing Microsoft Graph Java SDK to list licenses assigned to user
- Unknown characters while reading PDF file from Azure Blobl Storage
- Nothing read from Azure Blob storage after downloading file in stream data
- cosmos Change feed listener in java
- How to avoid "PKIX path building failed" error while querying Kusto with Java SDK?
- Find Deprecated releases of all the azure resources for java sdk using python script or any other script
- Azure blob API returns sure the value of Authorization header is formed correctly including the signature when uploading file to it
- Is there any Java application code that is connecting to Azure Data Factory using Azure Java SDK?
- 1.5 billion record insertion into cosmos db using java SDK
- Azure Event Hub Not Using All Partitions
- Having trouble downloading a certificate from Azure KeyVault as a .PFX using the Java SDK
- Application Insights integration with SpringBoot 2.7.12
- Azure Open AI bring your own data feature returning error on getChatCompletions call: "Functions are not supported at this time."
- Failed to execute goal com.microsoft.azure:azure-functions-maven-plugin:1.28.0
- Azure Data Factory Java SDK build dataset with Azure Data Explorer (Kusto) query
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?
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)
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: