RO EN
Cosmos DB patterns (5) — Emulator in CI/CD

Cosmos DB patterns (5) — Emulator in CI/CD

Real integration tests for Cosmos DB without a production account: Local emulator and in GitHub Actions as a service container, NUnit fixture with initialization, self-signed certificates, and timing traps.

Citește mai mult
Cosmos DB patterns (4) — optimistic concurrency with ETags

Cosmos DB patterns (4) — optimistic concurrency with ETags

Lost update: two processes read, modify, and save the same document — the last write overwrites the first. ETags and IfMatchEtag prevent the problem, with retry on PreconditionFailed and the Patch alternative for targeted operations.

Citește mai mult
Cosmos DB patterns (3) — multi-region writes

Cosmos DB patterns (3) — multi-region writes

When you need writes in multiple regions and what price you pay: consistency levels in a multi-region context, conflict resolution with Last-Writer-Wins and custom policies, plus configuring the .NET SDK.

Citește mai mult
Cosmos DB patterns (2) — Change Feed as a trigger for events

Cosmos DB patterns (2) — Change Feed as a trigger for events

Change Feed transforms the container into an event source: every insert and update becomes a trigger. Change Feed Processor in .NET, lease container, scaling across multiple instances, and practical cases.

Citește mai mult
Cosmos DB patterns (1) — partition key design for efficient queries

Cosmos DB patterns (1) — partition key design for efficient queries

How to choose the correct partition key in Cosmos DB: cardinality, distribution, and alignment with query patterns. Cross-partition queries, hierarchical partition keys, and concrete examples from an AI chat system.

Citește mai mult
Azure Service Bus (4) — Outbox pattern

Azure Service Bus (4) — Outbox pattern

The dual-write problem: the database and the message cannot be updated atomically. Outbox pattern with Cosmos DB and Service Bus: you save the event alongside the data, a dispatcher guarantees its publication, idempotent consumers close the loop.

Citește mai mult
Azure Service Bus (3) — dead-letter queue and retry policies

Azure Service Bus (3) — dead-letter queue and retry policies

What happens when processing fails: delivery count and abandonment, dead-letter queue, the difference between transient and permanent errors, retry with exponential backoff, and reprocessing of dead messages.

Citește mai mult
Azure Service Bus (2) — producers and consumers in .NET

Azure Service Bus (2) — producers and consumers in .NET

Complete implementation with Azure.Messaging.ServiceBus: ServiceBusClient with Managed Identity, message publishing with properties and batching, robust consumption with ServiceBusProcessor and the settings that matter.

Citește mai mult