Excalibur.EventSourcing.Firestore
10.0.0-alpha.10
dotnet add package Excalibur.EventSourcing.Firestore --version 10.0.0-alpha.10
NuGet\Install-Package Excalibur.EventSourcing.Firestore -Version 10.0.0-alpha.10
<PackageReference Include="Excalibur.EventSourcing.Firestore" Version="10.0.0-alpha.10" />
<PackageVersion Include="Excalibur.EventSourcing.Firestore" Version="10.0.0-alpha.10" />
<PackageReference Include="Excalibur.EventSourcing.Firestore" />
paket add Excalibur.EventSourcing.Firestore --version 10.0.0-alpha.10
#r "nuget: Excalibur.EventSourcing.Firestore, 10.0.0-alpha.10"
#:package Excalibur.EventSourcing.Firestore@10.0.0-alpha.10
#addin nuget:?package=Excalibur.EventSourcing.Firestore&version=10.0.0-alpha.10&prerelease
#tool nuget:?package=Excalibur.EventSourcing.Firestore&version=10.0.0-alpha.10&prerelease
Excalibur.EventSourcing.Firestore
Google Cloud Firestore event store implementation for Excalibur event sourcing.
Features
- Document-based event storage using
{aggregateType}:{aggregateId}as stream ID - Transactional writes for atomic event appending with optimistic concurrency
- Real-time listeners for event change subscriptions
- Optimistic concurrency with version-based conflict detection
- Emulator support for local development
Installation
dotnet add package Excalibur.EventSourcing.Firestore
Configuration
services.AddExcalibur(excalibur => excalibur.AddEventSourcing(es =>
es.UseFirestore(firestore => firestore
.ProjectId("my-gcp-project")
.CollectionName("events")
.CredentialsPath("/path/to/credentials.json"))));
Or via configuration:
services.AddExcalibur(excalibur => excalibur.AddEventSourcing(es =>
es.UseFirestore(firestore => firestore.BindConfiguration("FirestoreEventStore"))));
Using the Emulator
For local development with the Firestore emulator:
services.AddExcalibur(excalibur => excalibur.AddEventSourcing(es =>
es.UseFirestore(firestore => firestore
.EmulatorHost("localhost:8080")
.CollectionName("events"))));
Usage
The package registers both IEventStore and ICloudNativeEventStore:
public class MyService
{
private readonly IEventStore _eventStore;
public MyService(IEventStore eventStore)
{
_eventStore = eventStore;
}
public async Task AppendEventsAsync(
string aggregateId,
IEnumerable<IDomainEvent> events,
long expectedVersion,
CancellationToken ct)
{
var result = await _eventStore.AppendAsync(
aggregateId,
"MyAggregate",
events,
expectedVersion,
ct);
if (!result.Success)
{
// Handle concurrency conflict or failure
}
}
}
Real-time Subscription
Subscribe to event changes for projections or other event handlers:
var subscription = await _eventStore.SubscribeToChangesAsync(null, ct);
await subscription.StartAsync(ct);
await foreach (var change in subscription.ReadChangesAsync(ct))
{
// Process event change
Console.WriteLine($"Event: {change.Document?.EventType}");
}
Document Schema
The event store uses the following Firestore document schema:
| Field | Type | Description |
|---|---|---|
| streamId | String | Stream ID: {aggregateType}:{aggregateId} |
| eventId | String | Unique event identifier |
| aggregateId | String | Aggregate identifier |
| aggregateType | String | Aggregate type name |
| eventType | String | Event type name |
| version | Number | Event version |
| timestamp | String | ISO 8601 timestamp |
| eventData | String | Base64-encoded event data |
| metadata | String | Base64-encoded metadata |
| isDispatched | Boolean | Outbox dispatch status |
Requirements
- .NET 9.0+
- Google Cloud Firestore access (or local emulator)
Excalibur.Data.Firestorefor GCP SDK setup
License
See LICENSE files in repository root.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Ben.Demystifier (>= 0.4.1)
- CloudNative.CloudEvents (>= 2.8.0)
- CloudNative.CloudEvents.SystemTextJson (>= 2.8.0)
- Cronos (>= 0.12.0)
- Dapper (>= 2.1.72)
- Excalibur.Data.Abstractions (>= 10.0.0-alpha.10)
- Excalibur.Data.Firestore (>= 10.0.0-alpha.10)
- Excalibur.EventSourcing (>= 10.0.0-alpha.10)
- FluentValidation (>= 12.1.1)
- FluentValidation.DependencyInjectionExtensions (>= 12.1.1)
- Google.Api.Gax.Grpc (>= 4.13.1)
- Google.Apis.Auth (>= 1.73.0)
- Google.Cloud.Firestore (>= 4.2.0)
- Google.Protobuf (>= 3.34.1)
- Grpc.Net.Client (>= 2.76.0)
- IdentityModel (>= 7.0.0)
- JsonNet.ContractResolvers (>= 2.0.0)
- Medo.Uuid7 (>= 3.2.0)
- MemoryPack (>= 1.21.4)
- Microsoft.ApplicationInsights (>= 3.1.0)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Caching.Memory (>= 10.0.10)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Configuration.CommandLine (>= 10.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.10)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Console (>= 10.0.10)
- Microsoft.Extensions.ObjectPool (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
- Microsoft.IdentityModel.Tokens (>= 8.17.0)
- NCrontab (>= 3.4.0)
- OpenTelemetry (>= 1.15.3)
- OpenTelemetry.Api (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
- Polly (>= 8.6.6)
- System.IdentityModel.Tokens.Jwt (>= 8.17.0)
- System.IO.Hashing (>= 10.0.7)
- System.Threading.RateLimiting (>= 10.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0-alpha.10 | 47 | 9/6/2026 |
| 10.0.0-alpha.9 | 58 | 8/31/2026 |
| 10.0.0-alpha.8 | 65 | 8/14/2026 |
| 10.0.0-alpha.7 | 67 | 8/13/2026 |
| 10.0.0-alpha.6 | 64 | 8/11/2026 |
| 10.0.0-alpha.5 | 58 | 8/10/2026 |
| 10.0.0-alpha.4 | 62 | 8/10/2026 |
| 3.0.0-alpha.216 | 79 | 6/30/2026 |
| 3.0.0-alpha.215 | 69 | 6/23/2026 |
| 3.0.0-alpha.214 | 80 | 6/23/2026 |
| 3.0.0-alpha.208 | 75 | 6/11/2026 |
| 3.0.0-alpha.207 | 74 | 6/11/2026 |
| 3.0.0-alpha.205 | 74 | 6/10/2026 |
| 3.0.0-alpha.204 | 78 | 6/8/2026 |
| 3.0.0-alpha.203 | 72 | 6/8/2026 |
| 3.0.0-alpha.202 | 70 | 6/8/2026 |
| 3.0.0-alpha.201 | 81 | 6/8/2026 |
| 3.0.0-alpha.199 | 72 | 6/8/2026 |
| 3.0.0-alpha.198 | 73 | 5/28/2026 |
| 3.0.0-alpha.197 | 82 | 5/28/2026 |
Release notes and versioning policy: https://docs.excalibur-dispatch.dev/docs/migration/version-upgrades