Guest post: Subscription service for EventStoreDB


This is a guest post - Steven Blair is a Software Architect at VME Retail Ltd.


We have released version 1.0.0 of the Subscription Service, which is intended to make life that little bit easier for delivering events from EventStoreDB to clients.

The Subscription Service has been used privately by VME Retail Ltd for a few years in various solutions, and we decided to open the code up to the rest of the Event Store community.

Subscription Service for EventStoreDB

What does the Subscription Service do?

The Subscription Service is a light weight library intended to simplify creating and delivering events from EventStoreDB to various endpoints.

For example, if you have a requirement to deliver all events from a category to a third-party client, you could do this:

List<Subscription> subscriptions = new List<Subscription>();
subscriptions.Add(Subscription.Create("$ce-Accounts", "Read Model", new Uri("")));
SubscriptionService subscriptionService = new SubscriptionService(subscriptions, eventStoreConnection);
await subscriptionService.Start(CancellationToken.None);

The Subscription Service will connect (and create where applicable) the persistent subscription, and deliver all the events on this stream to the configured endpoint.

Business case for the subscription service

If Event Store is central to your system, there is a good chance you have a requirement to deliver events from here to other systems.

Examples of this might be:

  1. Read model
  2. Other bounded contexts (for eventual consistency)
  3. External systems out of your control

The Subscription Service sits in between your EventStoreDB and endpoints, and manages the delivery of these events.

This allows you to create routes for each stream (along with various configuration values).

One scenario we use at VME Retail is having a Subscription Service configured to deliver events to external systems. This means we can turn off delivery of these events by stopping the service, while continuing to consume events from other Subscription Services.

Technical details

For anyone interested in the technical details of the Subscription Service, here is a quick overview:

  1. Service will create the persistent subscription if it doesn’t already exist
  2. Service will manage acking / naking of posted events.
  3. User can easily override default http settings to customise posting (for example, if you need to include an authorisation token in your POST)

Additional information

The source code for the subscription service can be found on GitHub.

The package can be found on Nuget.

Related posts

Turning the database inside out with Event Store

Dave Remy,

A few years ago when I was I was just learning about CQRS and Event Sourcing I read the transcript of a fantastic talk by Martin Kleppman called Turning the Database Inside Out with Apache Samza ( At the time I found it mind blowing, and actually still do several years later. I recommend reading or watching Martin’s content on this subject. In this article I would like to summarize my understanding of his points and make the case that what Martin describes is a description of the CQRS/Event Sourcing view of the world described from a database perspective.

The Road to Cloud: Part 1

Zachary Schneider,

We made it! Event Store Cloud is now in Early Access. In this post, we will share some information about what we have built and what decisions allowed us to execute at a rapid pace with a small team.