public TopicTracker(TopicSelector selector) { switch (selector.DefaultOffsetSelection) { case OffsetSelectionStrategy.Earliest: case OffsetSelectionStrategy.Last: case OffsetSelectionStrategy.Next: case OffsetSelectionStrategy.NextUncommitted: nextOffset = (long)selector.DefaultOffsetSelection; break; case OffsetSelectionStrategy.Specified: nextOffset = selector.Offset; break; default: throw new InvalidOperationException("Unknown default offset selection: " + selector.DefaultOffsetSelection); } failureOffsetSelection = selector.FailureOffsetSelection; }
public TopicSelector() { DefaultOffsetSelection = OffsetSelectionStrategy.Specified; FailureOffsetSelection = OffsetSelectionStrategy.Next; }