This post:
is about EventStore.Client version 1.1.0. It explicitly states that version 2 differs in terms of catch-up subscription. I someone aware of similar code for version 3.0.1.0. The following code just does not work:
class Program
{
static void Main()
{
var ipEndPoint = new IPEndPoint(IPAddress.Loopback, 2113);
var connection = EventStoreConnection.Create(ipEndPoint);
var test = connection.SubscribeToStreamFrom(“FakeEventsStream”, StreamPosition.Start, false, eventAppeared);
}
private static void eventAppeared(EventStoreCatchUpSubscription arg1, ResolvedEvent resolvedEvent)
{
var originalMetaJson = JObject.Parse(Encoding.UTF8.GetString(resolvedEvent.Event.Metadata));
var orignalData = Encoding.UTF8.GetString(resolvedEvent.Event.Data);
var receivedEvent = resolvedEvent.Event;
Console.WriteLine("{0:D4} - {1}", receivedEvent.EventNumber, receivedEvent.EventType);
}
}
Thanks.