private void OnClusterMessageDiscarded(RawKafkaRecord kr)
 {
     if (CheckRecord(kr))
     {
         MessageDiscarded(ToRecord(kr));
     }
 }
示例#2
0
 private void OnClusterMessage(RawKafkaRecord kr)
 {
     if (CheckRecord(kr))
     {
         MessageReceived(ToRecord(kr));
     }
 }
 private static KafkaRecord <TKey, TValue> ToRecord(RawKafkaRecord kr)
 {
     return(new KafkaRecord <TKey, TValue> {
         Record = kr
     });
 }
 private bool CheckRecord(RawKafkaRecord kr)
 {
     return(kr.Topic == _topic && (kr.Key is TKey || kr.Key == null) && kr.Value is TValue);
 }