Beispiel #1
0
 public static DeleteTopicsResponse FromBytes(IRequestContext context, ArraySegment <byte> bytes)
 {
     using (var reader = new KafkaReader(bytes)) {
         var topics = new Topic[reader.ReadInt32()];
         for (var i = 0; i < topics.Length; i++)
         {
             var topicName = reader.ReadString();
             var errorCode = reader.ReadErrorCode();
             topics[i] = new Topic(topicName, errorCode);
         }
         return(new DeleteTopicsResponse(topics));
     }
 }