コード例 #1
0
 public List <TopicPartitionOffset> Commit()
 {
     foreach (var kp in offsets)
     {
         offsets[kp.Key] = producer.GetHistory(kp.Key).Count() + 1;
     }
     return(offsets.Select(k => new TopicPartitionOffset(new TopicPartition(k.Key, 0), k.Value)).ToList());
 }
コード例 #2
0
 public List <TopicPartitionOffset> Commit()
 {
     foreach (var kp in offsets)
     {
         var o = producer.GetHistory(kp.Key).Count() + 1;
         offsets[kp.Key] = new SyncConsumerOffset(o);
     }
     return(offsets.Select(k => new TopicPartitionOffset(new TopicPartition(k.Key, 0), k.Value.OffsetCommitted)).ToList());
 }