Beispiel #1
0
        public void WriteTo(KafkaBinaryWriter writer)
        {
            Guard.NotNull(writer, "writer");

            writer.WriteShortString(Topic, AbstractRequest.DefaultEncoding);
            writer.Write(PartitionsMetadata.Count());
            foreach (var partitionMetadata in PartitionsMetadata)
            {
                partitionMetadata.WriteTo(writer);
            }
        }
Beispiel #2
0
        public override string ToString()
        {
            var sb = new StringBuilder(1024);

            sb.AppendFormat("TopicMetaData.Topic:{0},Error:{1},PartitionMetaData Count={2}", Topic, Error,
                            PartitionsMetadata.Count());
            sb.AppendLine();

            var j = 0;

            foreach (var p in PartitionsMetadata)
            {
                sb.AppendFormat("PartitionMetaData[{0}]:{1}", j, p);
                j++;
            }

            var s = sb.ToString();

            sb.Length = 0;
            return(s);
        }