Cratis / Chronicle

Event Sourcing database built with ease of use, productivity, compliance and software evolution in mind.
https://cratis.io
MIT License
28 stars 5 forks source link

EventStore.RegisterAll called twice, once through EventStore.RegisterAll explicitly and once through the ConnectionLifecycle #1324

Open woksin opened 1 month ago

woksin commented 1 month ago

This occured while using the Orleans InProcess client. OnConnected event of ConnectionLifecycle has registered callbacks for registering the observers it seems

woksin commented 1 month ago

image

einari commented 1 month ago

Great catch.

I think the solution for this will be to not use the connection lifecycle system when we're in process, since there really is no connection. We reused the same concepts from the regular out-of-process .NET client with connection and client, which got us there faster but brings with it behavior we probably don't want for in-process clients.