简体   繁体   中英

Where to set maximum message size in Apache Kafka?

In which file I can increase the maximum message size for Kafka? (I'm sending records of String, byte[] and when I send byte[] of 770kb Kafka does not send the message)

In kafka 0.11.0 following four config options need to be set

Broker config options ( details ) :

  1. message.max.bytes - The largest record batch size allowed by Kafka.

  2. replica.fetch.max.bytes - The number of bytes of messages to attempt to fetch for each partition.

Producer config options ( details ) :

  1. max.request.size - The maximum size of a request in bytes. It is advisable to match this value with (message.max.bytes).

Consumer config options ( details ) :

  1. max.partition.fetch.bytes - max number of bytes per partition returned by the server. should be larger than the max.message.size so consumer can read the largest message sent by the broker.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM