track offset

This commit is contained in:
chrislu
2024-05-20 09:33:37 -07:00
parent 2b07a40da5
commit d8ab22012a
9 changed files with 215 additions and 183 deletions

View File

@@ -61,6 +61,10 @@ func (imt *InflightMessageTracker) AcknowledgeMessage(key []byte, tsNs int64) bo
return true
}
func (imt *InflightMessageTracker) GetOldest() int64 {
return imt.timestamps.Oldest()
}
// RingBuffer represents a circular buffer to hold timestamps.
type RingBuffer struct {
buffer []int64