Excalibur.EventSourcing.Firestore
3.0.0-alpha.19
This is a prerelease version of Excalibur.EventSourcing.Firestore.
dotnet add package Excalibur.EventSourcing.Firestore --version 3.0.0-alpha.19
NuGet\Install-Package Excalibur.EventSourcing.Firestore -Version 3.0.0-alpha.19
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Excalibur.EventSourcing.Firestore" Version="3.0.0-alpha.19" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Excalibur.EventSourcing.Firestore" Version="3.0.0-alpha.19" />
<PackageReference Include="Excalibur.EventSourcing.Firestore" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Excalibur.EventSourcing.Firestore --version 3.0.0-alpha.19
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Excalibur.EventSourcing.Firestore, 3.0.0-alpha.19"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Excalibur.EventSourcing.Firestore@3.0.0-alpha.19
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Excalibur.EventSourcing.Firestore&version=3.0.0-alpha.19&prerelease
#tool nuget:?package=Excalibur.EventSourcing.Firestore&version=3.0.0-alpha.19&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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.AddFirestoreEventStore(options =>
{
options.ProjectId = "my-gcp-project";
options.EventsCollectionName = "events";
options.CredentialsPath = "/path/to/credentials.json";
options.UseBatchedWrites = true;
options.MaxBatchSize = 500;
options.CreateCollectionIfNotExists = true;
});
Or via configuration:
services.AddFirestoreEventStore(configuration.GetSection("FirestoreEventStore"));
Using the Emulator
For local development with the Firestore emulator:
services.AddFirestoreEventStore(options =>
{
options.EmulatorHost = "localhost:8080";
options.EventsCollectionName = "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 | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- AWSSDK.Core (>= 4.0.3.8)
- AWSSDK.SecurityToken (>= 4.0.5.6)
- Ben.Demystifier (>= 0.4.1)
- CloudNative.CloudEvents (>= 2.8.0)
- CloudNative.CloudEvents.SystemTextJson (>= 2.8.0)
- Cronos (>= 0.11.1)
- Dapper (>= 2.1.66)
- Excalibur.Data.Abstractions (>= 3.0.0-alpha.19)
- Excalibur.Data.Firestore (>= 3.0.0-alpha.19)
- Excalibur.EventSourcing (>= 3.0.0-alpha.19)
- Google.Api.Gax.Grpc (>= 4.13.0)
- Google.Apis.Auth (>= 1.73.0)
- Google.Cloud.Firestore (>= 3.7.0)
- Google.Protobuf (>= 3.32.1)
- Grpc.Net.Client (>= 2.71.0)
- Medo.Uuid7 (>= 1.4.0)
- MemoryPack (>= 1.21.4)
- Microsoft.ApplicationInsights (>= 2.23.0)
- Microsoft.AspNetCore.Authorization (>= 9.0.9)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Caching.Memory (>= 10.0.0)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Logging (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.ObjectPool (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- MongoDB.Driver (>= 2.25.0)
- NCrontab (>= 3.4.0)
- Npgsql (>= 9.0.4)
- OpenTelemetry (>= 1.13.0)
- OpenTelemetry.Api (>= 1.13.0)
- OpenTelemetry.Extensions.Hosting (>= 1.13.0)
- QuestPDF (>= 2024.12.2)
- Snappier (>= 1.2.0)
- System.Threading.RateLimiting (>= 10.0.0)
-
net8.0
- AWSSDK.Core (>= 4.0.3.8)
- AWSSDK.SecurityToken (>= 4.0.5.6)
- Ben.Demystifier (>= 0.4.1)
- CloudNative.CloudEvents (>= 2.8.0)
- CloudNative.CloudEvents.SystemTextJson (>= 2.8.0)
- Cronos (>= 0.11.1)
- Dapper (>= 2.1.66)
- Excalibur.Data.Abstractions (>= 3.0.0-alpha.19)
- Excalibur.Data.Firestore (>= 3.0.0-alpha.19)
- Excalibur.EventSourcing (>= 3.0.0-alpha.19)
- Google.Api.Gax.Grpc (>= 4.13.0)
- Google.Apis.Auth (>= 1.73.0)
- Google.Cloud.Firestore (>= 3.7.0)
- Google.Protobuf (>= 3.32.1)
- Grpc.Net.Client (>= 2.71.0)
- Medo.Uuid7 (>= 1.4.0)
- MemoryPack (>= 1.21.4)
- Microsoft.ApplicationInsights (>= 2.23.0)
- Microsoft.AspNetCore.Authorization (>= 9.0.9)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Caching.Memory (>= 10.0.0)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Logging (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.ObjectPool (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- MongoDB.Driver (>= 2.25.0)
- NCrontab (>= 3.4.0)
- Npgsql (>= 9.0.4)
- OpenTelemetry (>= 1.13.0)
- OpenTelemetry.Api (>= 1.13.0)
- OpenTelemetry.Extensions.Hosting (>= 1.13.0)
- QuestPDF (>= 2024.12.2)
- Snappier (>= 1.2.0)
- System.Diagnostics.DiagnosticSource (>= 10.0.0)
- System.IO.Pipelines (>= 10.0.0)
- System.Threading.Channels (>= 10.0.0)
- System.Threading.RateLimiting (>= 10.0.0)
-
net9.0
- AWSSDK.Core (>= 4.0.3.8)
- AWSSDK.SecurityToken (>= 4.0.5.6)
- Ben.Demystifier (>= 0.4.1)
- CloudNative.CloudEvents (>= 2.8.0)
- CloudNative.CloudEvents.SystemTextJson (>= 2.8.0)
- Cronos (>= 0.11.1)
- Dapper (>= 2.1.66)
- Excalibur.Data.Abstractions (>= 3.0.0-alpha.19)
- Excalibur.Data.Firestore (>= 3.0.0-alpha.19)
- Excalibur.EventSourcing (>= 3.0.0-alpha.19)
- Google.Api.Gax.Grpc (>= 4.13.0)
- Google.Apis.Auth (>= 1.73.0)
- Google.Cloud.Firestore (>= 3.7.0)
- Google.Protobuf (>= 3.32.1)
- Grpc.Net.Client (>= 2.71.0)
- Medo.Uuid7 (>= 1.4.0)
- MemoryPack (>= 1.21.4)
- Microsoft.ApplicationInsights (>= 2.23.0)
- Microsoft.AspNetCore.Authorization (>= 9.0.9)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Caching.Memory (>= 10.0.0)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Logging (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.ObjectPool (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- MongoDB.Driver (>= 2.25.0)
- NCrontab (>= 3.4.0)
- Npgsql (>= 9.0.4)
- OpenTelemetry (>= 1.13.0)
- OpenTelemetry.Api (>= 1.13.0)
- OpenTelemetry.Extensions.Hosting (>= 1.13.0)
- QuestPDF (>= 2024.12.2)
- Snappier (>= 1.2.0)
- System.Diagnostics.DiagnosticSource (>= 10.0.0)
- System.Threading.Channels (>= 10.0.0)
- System.Threading.RateLimiting (>= 10.0.0)
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 |
|---|---|---|
| 3.0.0-alpha.19 | 31 | 2/26/2026 |