Skip to content

Instantly share code, notes, and snippets.

@gregoryyoung
Created September 14, 2016 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregoryyoung/02acd10276599f62db8357716548d4f5 to your computer and use it in GitHub Desktop.
Save gregoryyoung/02acd10276599f62db8357716548d4f5 to your computer and use it in GitHub Desktop.
var lowest = _outstandingMessages.GetLowestPosition();
var lowestBufferedRetry = _streamBuffer.GetLowestRetry();
Log.Debug("Lowest from outstanding is " + lowest);
Log.Debug("Lowest from streambuffer is " + lowestBufferedRetry);
lowest = Math.Min(lowest, lowestBufferedRetry);
if (lowest == int.MinValue) lowest = _lastKnownMessage;
//no outstanding messages. in this case we can say that the last known
//event would be our checkpoint place (we have already completed it)
var difference = lowest - _lastCheckPoint;
Log.Debug("lastCheckPoint is " + _lastCheckPoint);
Log.Debug("difference is " + difference);
[PID:253560:010 2016.09.14 15:42:20.640 DEBUG PersistentSubscripti] Lowest from outstanding is -2147483648
[PID:253560:010 2016.09.14 15:42:20.640 DEBUG PersistentSubscripti] Lowest from streambuffer is 2147483647
[PID:253560:010 2016.09.14 15:42:20.640 DEBUG PersistentSubscripti] lastCheckPoint is -1
[PID:253560:010 2016.09.14 15:42:20.640 DEBUG PersistentSubscripti] difference is 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment