Skip to main content

Brooks: Cosmos DB Provider

warning

This page contains placeholder content. Full configuration, operational, and troubleshooting guidance is still being written.

Overview

The Cosmos DB brook storage provider persists event streams to Azure Cosmos DB containers and uses Azure Blob Storage for distributed locking.

Packages

  • Mississippi.Brooks.Runtime.Storage.Cosmos
  • Mississippi.Brooks.Runtime.Storage.Abstractions

Registration

Register the provider with AddCosmosBrookStorageProvider() on IServiceCollection.

Configuration Options

Configuration is provided through BrookStorageOptions:

OptionDefaultDescription
ContainerIdBrookCosmosDefaults.ContainerIdCosmos DB container for event storage
DatabaseIdBrookCosmosDefaults.DatabaseIdCosmos DB database identifier
CosmosClientServiceKeyBrookCosmosDefaults.CosmosClientServiceKeyKeyed service key for resolving CosmosClient
MaxEventsPerBatch90Maximum events per transactional batch
MaxRequestSizeBytes1_700_000Maximum request size in bytes for Cosmos DB operations
QueryBatchSize100Batch size for query operations
LeaseDurationSeconds60Distributed lock lease duration
LeaseRenewalThresholdSeconds20Threshold before lease renewal
LockContainerNameBrookCosmosDefaults.LockContainerIdBlob container for distributed locking

Container Initialization

Distributed Locking

Batching

Operational Notes

Summary

The Cosmos DB brook storage provider handles event persistence, distributed locking, and batched writes for Brooks event streams. Detailed operational and configuration guidance is pending.

Next Steps