kafka消息发送大小限制 python confluent_kafka客户端
kafka的broker限制调整过后,发送图片base64编码,出现下面的问题
此处有关于kafka配置的参数说明:
librdkafka/CONFIGURATION.md at master · confluentinc/librdkafka · GitHub
图片上传错误,报出:
cimpl.KafkaException: KafkaError{code=MSG_SIZE_TOO_LARGE,val=10,str="Unable to produce message: Broker: Message size too large"}
的错误。
在客户端增加一个配置:
'message.max.bytes': 200000000
p = Producer({'bootstrap.servers': self.kafkaUrl,
'message.max.bytes': 200000000})