We are facing an issue while running a Kafka consumer (Java). The poll returns fewer messages when the messages are larger. We have tried increasing different config parameters while constructing the consumer such as fetch.min.bytes
, fetch.max.bytes
, max.partition.fetch.bytes
and fetch.max.wait.ms
but the output is the same. (5-8 messages)
We found that the messages in a single poll amount to roughly 10KB in size. This was found when we tried to get the sum of byte length (message.value().getBytes().length
) of the ConsumerRecords returned on a poll.