Skip to content

PR #2 - Migrate: Totem TCP -> gRPC client and EventStoreDB 20.10 -> 24.10+#95

Open
AlexanderJohnston wants to merge 22 commits into
bwatts:devfrom
AlexanderJohnston:feature/grpc-Cleanup
Open

PR #2 - Migrate: Totem TCP -> gRPC client and EventStoreDB 20.10 -> 24.10+#95
AlexanderJohnston wants to merge 22 commits into
bwatts:devfrom
AlexanderJohnston:feature/grpc-Cleanup

Conversation

@AlexanderJohnston

@AlexanderJohnston AlexanderJohnston commented Feb 16, 2026

Copy link
Copy Markdown

Conflict Resolution

Notes and justification for you.

ClientDb: In the old TCP client, e.Event.Data was a byte[]. In the new gRPC client, it's a ReadOnlyMemory. The FromJsonUtf8 method and MemoryStream constructor both expect byte[], so .ToArray() is needed to convert from ReadOnlyMemory to byte[].
TimelineDb: I believe this WriteResult type was made into an interface at some point but I couldn't track down when.

Summary

Migrates Totem.Timeline.EventStore from the legacy TCP-based EventStoreDB client (EventStore.ClientAPI.NetCore v4.1.0.23) to the gRPC client (EventStore.Client.Grpc.Streams + EventStore.Client.Grpc.ProjectionManagement v23.3.9).

Required because EventStoreDB 24.10+ dropped TCP protocol support.

Implementation

  • Target framework: netstandard2.0 → net10.0
  • Connection model: IEventStoreConnection → EventStoreClient; removed connection lifecycle events and EventStoreLogAdapter since gRPC does not support lifecycle events, and gRPC has its own log adapter.
  • EventData: Guid → Uuid, explicit "application/json" content type. Don't quote me on this but a month or two ago I read that ESDB has slightly different metadata envelope handling, but it's buried in a migration wiki page somewhere.
  • Reads: ReadEventAsync/ReadStreamEventsBackwardAsync → ReadStreamAsync with IAsyncEnumerable
  • Writes: ExpectedVersion.Any → StreamState.Any, WriteResult → IWriteResult
  • Subscriptions: TCP catch-up/volatile → gRPC SubscribeToStreamAsync
  • Projections: ProjectionsManager → EventStoreProjectionManagementClient
  • Configuration: Removed TCP options, added ConnectionString and support for Server.InSecure connstrings.
  • Integration tests: Updated for ESDB

Migration Strategy For Existing Consumers

  • Deploy ESDB 24.10 to dev/staging
  • Figure out your TLS setup for production
  • Update resume-projection.js and ensure it is re-hydrated.

bwatts and others added 22 commits February 6, 2026 09:46
- Write to the client stream whether or not the checkpoint write succeeds
- Do not ignore events routed to stopped flows
- Avoid a null reference when an existing flow fails to load
The SkipException handling that required await was removed in a prior commit.
Simplify back to returning the task directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AlexanderJohnston AlexanderJohnston changed the title Migrate Totem from TCP -> gRPC client and EventStoreDB 20.10 -> 24.10+ PR #2 - Migrate Totem from TCP -> gRPC client and EventStoreDB 20.10 -> 24.10+ Feb 17, 2026
@AlexanderJohnston AlexanderJohnston changed the title PR #2 - Migrate Totem from TCP -> gRPC client and EventStoreDB 20.10 -> 24.10+ PR #2 - Migrate: Totem TCP -> gRPC client and EventStoreDB 20.10 -> 24.10+ Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants