Skip to content

Commit

Permalink
Merge pull request #459 from Shopify/clarify-max-response-size
Browse files Browse the repository at this point in the history
Update and simplify doc for MaxResponseSize
  • Loading branch information
eapache committed May 29, 2015
2 parents d546818 + 2ca3f4f commit b86f862
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sarama.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ var PanicHandler func(interface{})
var MaxRequestSize int32 = 100 * 1024 * 1024

// MaxResponseSize is the maximum size (in bytes) of any response that Sarama will attempt to parse. If
// a broker returns a response message larger than this value, Sarama will return a PacketDecodingError. The
// default of 100 MiB is aligned with Kafka's default `socket.request.max.bytes`, which is the largest
// request the broker will attempt to process.
// a broker returns a response message larger than this value, Sarama will return a PacketDecodingError to
// protect the client from running out of memory. Please note that brokers do not have any natural limit on
// the size of responses they send. In particular, they can send arbitrarily large fetch responses to consumers
// (see https://issues.apache.org/jira/browse/KAFKA-2063).
var MaxResponseSize int32 = 100 * 1024 * 1024

0 comments on commit b86f862

Please sign in to comment.