GRPC .NET Client 56 seconds event subscription

Hello, I am currently working a POC for the next generation of my companies product. We decided to investigate using event sourcing with micro services and a single event store cluster providing the Command side storage. The plan is to then have a series of “projection” services that are subscribed to the event store reading events and building datasets for each query service.

I started using 5.0.x event store and all was going well I was using catch up subscriptions to provide the events for the data store and the events would hit the database less than a second after they had been written. I then upgraded to 20.6 and the GRPC client API and using the EventStoreClient.SubscribeToAllAsync and EventStoreClient.SubscribeToStreamAsync methods. This works fine when the service initially starts and it is running through any events that happened since the position passed in however as soon as it hits live it can take minutes to receive the events.

The I am running the store in docker to allow me to deploy it along with the other services to my colleagues and setting up the connection using dotnetcore dependency injection:

collection.AddSingleton(services =>
{
var options = services.GetService<IOptions>();
var config = options.Value;

var settings = new EventStoreClientSettings()
{
    LoggerFactory = services.GetService<ILoggerFactory>(),
    ConnectionName = $"{config.ConnectionName}-{Guid.NewGuid()}",
    ConnectivitySettings = {
        Address = new Uri(config.Address)
    },
    DefaultCredentials = new UserCredentials(config.Username, config.Password),
    CreateHttpMessageHandler = () =>
        new SocketsHttpHandler
        {
            SslOptions =
            {
                RemoteCertificateValidationCallback = delegate
                {
                    return true;
                }
            }
        }
};

return settings;

});
collection.AddSingleton(services=>
{
var options = services.GetService();

return new EventStorePersistentSubscriptionsClient(options);

});
collection.AddSingleton(services=>
{
var options = services.GetService();

return new EventStoreClient(options);

});

As I am only doing a POC I avoiding using TLS. The EventStoreClient is then injected into classes that start the subscription.

I am aware that I should not expect it to be instant and that eventual consistency is part of the trade off however a local system running 1 event through it at a time feels like it should respond faster.

Any assistance or explanation for this would be much appreciated.

there was a bug in 20.6.0 that is fixed in the imminent 20.6.1 release https://github.com/EventStore/EventStore/pull/2566