Ejemplo n.º 1
0
 public void FetchFrom(KafkaReader reader)
 {
     Crc        = reader.ReadInt32();                //move 4
     MagicByte  = reader.ReadByte();                 //move 1
     Attributes = (MessageCodec)reader.ReadByte();   //move 1
     Key        = reader.ReadBytes();                //move 4 + len(bytes) if not null
     Value      = reader.ReadBytes();                //move 4 + len(bytes) if not null
 }
Ejemplo n.º 2
0
        public void FetchFrom(KafkaReader reader)
        {
            //Version = reader.ReadInt16();
            //Topics = reader.ReadStrings();
            //UserData = reader.ReadBytes();

            var protocolMetadata = reader.ReadBytes();

            if (protocolMetadata == null)
            {
                return;
            }
            using (var stream = new MemoryStream(protocolMetadata))
                using (var reader2 = new KafkaReader(stream)) {
                    Version  = reader2.ReadInt16();
                    Topics   = reader2.ReadStrings();
                    UserData = reader2.ReadBytes();
                }
        }
Ejemplo n.º 3
0
        public void FetchFrom(KafkaReader reader)
        {
            //Version = reader.ReadInt16();
            //PartitionAssignments = reader.ReadArray<SyncGroupPartitionAssignment>();
            //UserData = reader.ReadBytes();

            var memberAssignment = reader.ReadBytes();

            if (memberAssignment == null || memberAssignment.Length == 0)
            {
                return;
            }

            using (var stream = new MemoryStream(memberAssignment))
                using (var reader2 = new KafkaReader(stream)) {
                    Version = reader2.ReadInt16();
                    PartitionAssignments = reader2.ReadArray <SyncGroupPartitionAssignment>();
                    UserData             = reader2.ReadBytes();
                }
        }