Closed sakib-malik-7417 closed 1 month ago
Also on another note shouldn't below line be of Warn
log level:
example[DEBUG] read from broker errored, killing connection; req: Fetch, addr: <broker_1>:9092, broker: 0, successful_reads: 0, err: invalid large response size 131108 > limit 1024
Was the batch produced at the offset you're consuming from very large? Kafka does not return individual records, only batches.
Was the batch produced at the offset you're consuming from very large? Kafka does not return individual records, only batches.
If I understand correctly, if the producer created a batch of 100 records with a total size of 10MB at offset 0, and I issue a fetch request with a maximum byte size of 1MB at the same offset, would Kafka still return all 100 records in that batch? Is it possible for Kafka to return just the first few records up to the 1MB limit, or does it always return the entire batch?
@twmb We were able to reproduce the issue, and it seems to be caused by the larger batch size. Thanks for the help—learned something new today! :)
@twmb Thanks for the quick response, also can you please comment on this as well:
Also on another note shouldn't below line be of Warn log level: example[DEBUG] read from broker errored, killing connection; req: Fetch, addr:
:9092, broker: 0, successful_reads: 0, err: invalid large response size 131108 > limit 1024
Connections can die regularly -- e.g., internet traffic weather, temporary internet outages. IMO warn is reserved for things that shouldn't happen but we can recover, but you should really know because you should probably look into a problem somewhere OR more generally, things you should be aware of and look into if you have a logger setup. A connection being cut is pretty common and very retryable, so I don't throw that at warn -- or even info.
Hi, We were using the below code for fetching from a topic, assuming all of our payloads are small enough
And given
fetch_max_bytes
= 512B,broker_max_read_bytes
=1KB,We are not able to consume and getting below in the DEBUG logs, the response size (131108 =~ 130KB) is much bigger than the
fetch_max_bytes
andbroker_max_read_bytes
and also a single record cannot contain that much sizeCan you help me understand why this is happening?