Subscribe to EventStore catch-up subscription from the start with C# example

EventStore is an open-source database technology designed for storing, retrieving, and querying event data using a stream-based approach. In EventStore, a catch-up subscription is used to read events from a given point in a stream and catch up to the most recent events. When starting a catch-up subscription, you can specify the starting position using an event number or position. However, in some cases, you might want to start from the beginning or the very first event. Here’s how you can achieve that:

Continue reading “Subscribe to EventStore catch-up subscription from the start with C# example”

Eventstore – Extra Statistics Option on Persistent Subscription – Where is it?

When creating a new persistent subscription in EventStore, there are many options to configure. The extra statistics option was a peculiar one, once enabled there is no indication on what it is doing and where you can see the extra statistics. My previous post about viewing more detailed information on an EventStore persistent subscription likely gave away the answer, the json result of the info link for the persistent subscription has a connections collection. With extra statistics enabled you will see statistics gathered for each connection. Continue reading “Eventstore – Extra Statistics Option on Persistent Subscription – Where is it?”

EventStore HTTP API – Replaying Parked Messages in C# with HttpClient

Eventstore’s competing consumer pattern is implemented through the use of persistent subscriptions.  Competing consumers is a great pattern to use when you need multiple consumers pulling from a single stream with the state of the stream being managed by EventStore.  In order for the consumer to keep receiving messages they must ack/nack the message they received in some way.  The happy path would lead to the consumer being able to process the message and returning an ack back to signify that the message was processed.  If a consumer is unable to process the message, there are multiple options that can be taken, likely ending in the message being parked.  Each subscription group created will have another stream available known as the parked message queue.  Messages which are not acknowledged can be put into this queue for diagnosis later.  Through EventStore’s web ui, you can easily click the replay parked messages link for a particular subscription group.  If there is a need to programmatically replay this queue it can be done through the REST API.

 

Here is an example on how to programmatically invoke the replay parked messages functionality. Continue reading “EventStore HTTP API – Replaying Parked Messages in C# with HttpClient”