Eventstore: Messages not being Acknowledged Known/Current not catching up

Created on 4 Mar 2019  路  3Comments  路  Source: EventStore/EventStore

I have set-up a stream and currently subscribe using Persistent subscription to the stream. Events are coming through but when I call acknowledge through the .net client it fails to remove the message from the event store stream (or make it known?)

// Start Connection

  var eventConnection = EventStoreConnection.Create(new Uri(uriString));
  eventConnection.ConnectAsync().Wait();
  eventConnection.Closed += EventConnection_Closed;

// Create subsription

            subscription = this.connection
                .ConnectToPersistentSubscription(
                    config.StreamName,
                    config.Group,
                    EventAppeared,
                    SubscriptionDropped,
                    credentials,
                    bufferSize: 10,
                    autoAck: false);

// Subscription Dropped Event Handler

        public void SubscriptionDropped(
            EventStorePersistentSubscriptionBase eventStorePersistentSubscriptionBase,
            SubscriptionDropReason subscriptionDropReason, Exception ex)
        {
            //HealthService.SubscritionActive();
            Subscribe();
        }

// Event Appeared event handler

 public Task EventAppeared(EventStorePersistentSubscriptionBase eventStoreSubscriptionBase, ResolvedEvent resolvedEvent)
        {
            eventStoreSubscriptionBase.Acknowledge(resolvedEvent.Event.EventId);
            return Task.FromResult(true);
        }

image
image

Events come through once as expected but there still shows 7 messages on the stream/group and if I update the stream then it resends again? I'm lost in why this simple example isn't working as expected and hope I can debug further

Most helpful comment

After two days of researching, I've finally found an answer to the issues I have been experiencing.

https://groups.google.com/forum/#!searchin/event-store/event$20acknowledge%7Csort:date/event-store/1JItY9y0qaI/TcksBjGxCgAJ

It's probably best updating the documentation to be a bit more informative to why there could still be messages left in the event store after they have been acknowledged.

For anyone else stumbling on this issue, there is a Min Checkpoint count which was set to 10 meaning that the messages only get logged and acknowledged after every 10 messages. If the stream group gets updated they all get resent so it's something to be aware of! I've had to set the checkpoint to 1 to resolve this

All 3 comments

After two days of researching, I've finally found an answer to the issues I have been experiencing.

https://groups.google.com/forum/#!searchin/event-store/event$20acknowledge%7Csort:date/event-store/1JItY9y0qaI/TcksBjGxCgAJ

It's probably best updating the documentation to be a bit more informative to why there could still be messages left in the event store after they have been acknowledged.

For anyone else stumbling on this issue, there is a Min Checkpoint count which was set to 10 meaning that the messages only get logged and acknowledged after every 10 messages. If the stream group gets updated they all get resent so it's something to be aware of! I've had to set the checkpoint to 1 to resolve this

It's all about Min Checkpoint Count, thank you @p0onage for your reply here and description how to solve that problem.

Was this page helpful?
0 / 5 - 0 ratings