Exemple #1
0
            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;
            }
Exemple #2
0
 public TopicSelector()
 {
     DefaultOffsetSelection = OffsetSelectionStrategy.Specified;
     FailureOffsetSelection = OffsetSelectionStrategy.Next;
 }
 public TopicSelector()
 {
     DefaultOffsetSelection = OffsetSelectionStrategy.Specified;
     FailureOffsetSelection = OffsetSelectionStrategy.Next; 
 }