Handling Real-Time Data Sync with Cosmos DB Change Feed
Stop polling your database for updates. Learn how to use the Cosmos DB Change Feed to build low-latency, event-driven pipelines that sync data in real-time.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stop polling your database for updates. Learn how to use the Cosmos DB Change Feed to build low-latency, event-driven pipelines that sync data in real-time.
Learn how to implement event-driven synchronization using Azure Cosmos DB Change Feed, covering architecture, processor configuration, failure modes, and scaling strategies.
Denormalized Cosmos DB models often require two documents to change together. TransactionalBatch gives you atomic, all-or-nothing writes within one logical partition — here's how it works, a .NET example, and where it falls down.
Your Cosmos DB partition key is chosen once and paid for forever. Here's how logical partitions, the 20 GB cap, and cross-partition fan-out should drive the decision — and how to validate it with measured RU charges.
Learn how Azure Cosmos DB's Session consistency level gives read-your-writes with latency close to Eventual, and see a .NET example that shows the trade-off and verification steps.
An architecture note on Cosmos DB transactional batch: when partition-scoped atomicity fits, the smallest design that uses it, idempotent retry handling, and the signals that should push you to an outbox pattern instead.
Cross-partition queries eating your RU budget? Cosmos DB's Change Feed lets you project writes into a second container with a different partition key — here's how the lease/checkpoint machinery works, a working Functions example, and the lag and idempotency traps to design for.
Continuation tokens let you page through Cosmos DB results without re-scanning skipped documents. This post shows the .NET iteration pattern, explains why OFFSET/LIMIT still charges for skipped rows, and covers token size limits, throttling retries, and verification steps.
Azure Cosmos DB Change Feed provides a persistent, ordered log of inserts and updates that microservices can consume directly. This post shows how to set it up, run a sample processor, and consider its limits.