CatchupSubscription question

I create a CatchupSubscription, and implement the EventAppeared.
I add some logging in indicating when an Event appears, and as exepcetd they appear sequentially, one after another.
If I add an awaitable call in the eventhandler, the behaviour changes. As soon as it hits the await, more events appears start apeparing while the current event is being awaited on.

Is this expected, and perhaps my understand of the process is the problem?

Small code example:

String connectionString = “ConnectTo=tcp://admin:changeit@127.0.01:1113;VerboseLogging=true;”;

var eventStoreConnection = EventStoreConnection.Create(connectionString);
await eventStoreConnection.ConnectAsync();

String streamname = @"$et-myEvents";

var r = eventStoreConnection.SubscribeToStreamFrom(streamname, 0,
CatchUpSubscriptionSettings.Default,
async (subscription,
@event) =>
{
var request = BuildHttpRequestMessage(@event.OriginalEvent.Data);

var httpClient = GetHttpClient();

//When this code is hit, the next Event Appears!
await httpClient.SendAsync(request, CancellationToken.None);
});

Any ideas?

Could you elaborate on “more events start appearing”? Appearing where?

Alexey,

In the EventAppeared method I setup SubscribeToStreamFrom.
If I log out the event number in this Func, I can see event appears in the expected, 1 at a time.
As soon as I introduced this async call, and invoke, execution immediately switches to EventAppeared with a new event (while my first event is still doing it’s thing) and this continues on (we only noticed this was happening because our database was getting hammered)

Does that make it clearer?