MCPcopy
hub / github.com/segmentio/kafka-go / messageSetSize

Function messageSetSize

write.go:602–614  ·  view source on GitHub ↗
(msgs ...Message)

Source from the content-addressed store, hash-verified

600}
601
602func messageSetSize(msgs ...Message) (size int32) {
603 for _, msg := range msgs {
604 size += 8 + // offset
605 4 + // message size
606 4 + // crc
607 1 + // magic byte
608 1 + // attributes
609 8 + // timestamp
610 sizeofBytes(msg.Key) +
611 sizeofBytes(msg.Value)
612 }
613 return
614}

Callers 2

writeProduceRequestV2Method · 0.85
compressMessageSetFunction · 0.85

Calls 1

sizeofBytesFunction · 0.85

Tested by

no test coverage detected