EventStorePersistentSubscription and manual Acknowledge

I am trying to use manual acknowledge with competitive consumers
I use latest code from gihub repository

both server and client are built from it.

I also tried to make it work few weeks ago with then latest code.

This is the code I use to connect to subscription:

_Connection.ConnectToPersistentSubscription(

_ReadModelStream, // “all”

_ReadModelVersion, // “process_manager_kirill”

EventAppeared,

SubscriptionDropped,

GetCredentials(),

10, // bufferSize

false // autoAck

);

this is EventAppeared method:

private void EventAppeared(EventStorePersistentSubscriptionBase subscription, ResolvedEvent e)

{

try

{

Process(GetEvents(e));

subscription.Acknowledge(e);

}

catch (Exception ex)

{

subscription.Fail(e, PersistentSubscriptionNakEventAction.Park, ex.ToString());

}

}

But what I get is - In Flight column inside “Competing Consumers” tab in EventStore web interface shows that buffer is full - “10”

and new messages are not being processed.

I think this is because it does not respect “Acknowledge” sent manually

Is there any sample of code that guides how to use manual acknowledge?

But it does with autoack? all autoack does is basically that same code

https://github.com/EventStore/EventStore/blob/dev/src/EventStore.ClientAPI/EventStorePersistentSubscriptionBase.cs#L88

https://github.com/EventStore/EventStore/blob/dev/src/EventStore.ClientAPI/EventStorePersistentSubscriptionBase.cs#L197

Yes autoack works fine
problem with autoack is - I cannot park or skip messages and they are making buffer full

Hmm as autoack and ack call same code ...

I use linked stream as a source of a subscription
the source is built using this projection:

fromAll().whenAny(function(s,e){

linkTo(‘all’,e);

});

thats the issue i think try a reg stream?

pushinh fix

have baby in one arm so may be slow (or wait until he sleeps) :slight_smile:

I just noticed -
manual Ack uses this code:

_subscription.NotifyEventsProcessed(new[] { @event.Event.EventId });

while

auto

_subscription.NotifyEventsProcessed(new[]{e.OriginalEvent.EventId});

ok, will wait for a fix

thanks

https://github.com/EventStore/EventStore/pull/465

Thanks :))

So much for only F# and C today.