问题
I'm trying to use Kafka to send a message of ~10Mb. I know its default size is 1Mb, but is that a hard limit? Can librdkafka support >10Mb and how do I set it?
回答1:
You need to configure the topic max.message.bytes
(see https://kafka.apache.org/22/documentation.html#topicconfigs), and configure the producer with message.max.bytes
(see https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md).
Please allow some extra space (at least ~500 bytes) for protocol overhead.
来源:https://stackoverflow.com/questions/60739858/how-to-set-the-max-size-of-a-kafka-message-using-librdkafka