Skip to content
New issue

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

Clarification on sarama.MaxResponseSize limit #458

Closed
4578395263256 opened this issue May 27, 2015 · 1 comment · Fixed by #459
Closed

Clarification on sarama.MaxResponseSize limit #458

4578395263256 opened this issue May 27, 2015 · 1 comment · Fixed by #459

Comments

@4578395263256
Copy link

I don't think the comment here is necessarily correct: https://github.com/Shopify/sarama/blob/master/sarama.go#L44
as I have observed receiving a 170MB fetch response that is hitting the MaxResponseSize limit. It seems like socket.request.max.bytes is a limit only on the request size and not the response size. Also this: https://issues.apache.org/jira/browse/KAFKA-2063 seems to indicate that you can't actually control the fetch response size.

Also just curious as to whether there is some protocol limitation that absolutely prevents a response from being larger than 2GB?

@eapache
Copy link
Contributor

eapache commented May 28, 2015

Hmm, you may be right, I'll dig into this more tomorrow.

Also just curious as to whether there is some protocol limitation that absolutely prevents a response from being larger than 2GB?

Yes, every message starts with a signed 32-bit length field, so a message cannot ever contain more than 2^31 bytes (2GiB). See https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-CommonRequestandResponseStructure

eapache added a commit that referenced this issue May 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants