Competing Consumer Current State

Regarding the Competing Consumers area of the web ui, can anyone give me a quick run down on what the ‘Known’ and ‘Current’ columns along with the Status area are telling me?

I believe my client has acknowledged each event yet I still get the red indicator which makes me think it has actually missed a number of events.

Current is the current position in the stream, known is the last written event in the stream. What settings are you using on your stream?

The subscriptions settings I’m currently using are .WithExtraStatistics, .ResolveLinkTos & .StartFromBeginning, all other are the defaults.

What I’m failing to see is that my client writes out to a console window when an event is read. So for example I read the event and then write out to the console app that for example event number 119 has been received and I’ve sent an acknowledge back. The UI displays 119 within Known column but the current position is still behind.

So it has printed out the full 119 but statistics just isn’t showing it? if I understand correctly?

Yes that is correct.

I’m new to ES so just first time looking at these consumers and just trying to understand it.

is this with a single consumer or multiple on the group?

Currently running clients running on a single group

Two images - my client console trace showing that events 270 to 272 (0 indexed) have been processed and ES showing that there are 273 known events and 267 current.

Yes but you are running multiple clients in the group?

Yes I’m running multiple clients in the group, my previous post should have said that.

So what I have is 3 clients all connected to the same group.

What happens if you add one message? I am guessing it will update and give you the right answer. IIRC the number isn’t perfect but close to where the stream actually is (due to concurrency etc)

Think I’ve found it. The Current column is being updated based on the last checkpoint, I had ‘MinimumCheckPointCountOf’ set to 10 so was only ever being updated every 10 events. If I set this property1 then both the Known and Current columns are kept in sync.

Does that sound right?

Seems reasonable though its RARE you would want a checkpoint/message that would cause a write for every message read (and would be slow).

Did just doing a single write cause it to update as well?

Agree that you wouldn’t want a checkpoint per message, was just trying a few different settings to see how the UI updated.

Regarding the single write, when the minimum check point count set to the default of 10 I see the following:

  • Known - Increments by 1
  • Current - Only changes when checkpoint hit, otherwise remains the same value
  • Status # of msgs / catchup time - As an example if Known is 40 & Current 36, this will flash green and 4/4, it then returns to red 4/0. It only remains at green 0/0 when the checkpoint is hit.
    This may all be normal operations btw, just trying to understand it a bit better.