We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
byteSize
I want to use byteSize to compute the size of a message and decide whether to send it,because I meet an error while sending a big message
func (m *ProducerMessage) byteSize(version int) int { var size int if version >= 2 { size = maximumRecordOverhead for _, h := range m.Headers { size += len(h.Key) + len(h.Value) + 2*binary.MaxVarintLen32 } } else { size = producerMessageOverhead } if m.Key != nil { size += m.Key.Length() } if m.Value != nil { size += m.Value.Length() } return size }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to use
byteSize
to compute the size of a message and decide whether to send it,because I meet an error while sending a big messageThe text was updated successfully, but these errors were encountered: