Skip to main content

Posts

Showing posts with the label NEventStore

NEventStore PollingClient does nothing

For my next project we’ll use Event Sourcing. Therefore I’m spending some free time in looking at NEventStore , a persistence agnostic Event Store for .NET. One of the features of NEventStore is a built-in PollingClient allowing you to poll the Event Store for the latest commits. However when I tried to test the PollingClient nothing happened?! Here is the code I was using: No exception was thrown, however when I browsed through the Output window in Visual Studio I noticed the following message: A first chance exception of type 'Newtonsoft.Json.JsonSerializationException' occurred in NEventStore.dll It seems that the PollingClient immediatelly tries to deserialize the committed events, as I didn’t include a reference to the assembly containing the Events, the deserializer (silently) fails. To fix it, the only thing I had to do was adding a reference to my Events assembly.