How Does the Transactional Outbox Pattern Work in Azure Cosmos DB?

Azure Cosmos DB
27,606 views •

The transactional outbox pattern in Azure Cosmos DB avoids unreliable dual writes by saving a business item and its outbox event together in one atomic transactional batch. Both documents must share the same container and logical partition key value. A change feed processor then relays the event to a message broker. In this two-minute explainer, Patty Chow answers: • What problem does the transactional outbox pattern solve? It prevents a successful database write from leaving no stored event to publish when messaging fails. • What can Azure Cosmos DB commit atomically? The business item and outbox event within one container and one logical partition. Publishing to the message broker happens separately, after the database transaction. • Does this guarantee exactly-once delivery? No. Change feed processing is at least once, so the relay can publish duplicates. Use stable event IDs for deduplication and make consumers idempotent so processing an event again has no additional effect. Speaker: Patty Chow Learn how to implement the transactional outbox pattern: https://learn.microsoft.com/azure/architecture/databases/guide/transactional-out-box-cosmos #AzureCosmosDB #NoSQL

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close