Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache kafka Kafka Producer将生产者消息限制为1024字节_Apache Kafka_Kafka Consumer Api_Kafka Producer Api - Fatal编程技术网

Apache kafka Kafka Producer将生产者消息限制为1024字节

Apache kafka Kafka Producer将生产者消息限制为1024字节,apache-kafka,kafka-consumer-api,kafka-producer-api,Apache Kafka,Kafka Consumer Api,Kafka Producer Api,我正在尝试使用终端生成卡夫卡消息。我下载了这个版本kafka_2.12-2.4.1.tgz。我尝试启动Zookeeper服务器,然后启动Kafka服务器。我有一个超过1024字节的json。不允许发送超过1024字节 我试着提到。但那没用。不确定是否缺少任何配置更改 制作人配置 max.request.size=2147483647 socket.buffer.size=2147483647 socket.request.max.bytes=2147483647 replica.fetch

我正在尝试使用终端生成卡夫卡消息。我下载了这个版本
kafka_2.12-2.4.1.tgz
。我尝试启动Zookeeper服务器,然后启动Kafka服务器。我有一个超过1024字节的json。不允许发送超过1024字节

我试着提到。但那没用。不确定是否缺少任何配置更改

制作人配置

max.request.size=2147483647 
socket.buffer.size=2147483647 
socket.request.max.bytes=2147483647
replica.fetch.max.bytes=2147483647
message.max.bytes=2147483647
max.message.bytes=2147483647
replica.fetch.max.bytes=2147483647
服务器配置

max.request.size=2147483647 
socket.buffer.size=2147483647 
socket.request.max.bytes=2147483647
replica.fetch.max.bytes=2147483647
message.max.bytes=2147483647
max.message.bytes=2147483647
replica.fetch.max.bytes=2147483647
消费者配置

max.request.size=2147483647
fetch.message.max.bytes=2147483647
max.partition.fetch.bytes=2147483647

对于接收大型消息,您也应该使用
max.partition.fetch.bytes
consumer config参数

max.partition.fetch.bytes:服务器将返回的每个分区的最大数据量。记录是分批获取的 由消费者提供。如果第一个记录批次中的第一个非空 获取的分区大于此限制,批仍将继续 返回以确保消费者能够取得进步。最大值 代理接受的记录批量大小通过定义 message.max.bytes(代理配置)或max.message.bytes(主题配置)。 有关限制使用者请求大小的信息,请参阅fetch.max.bytes


提供你的制作人configuration@bottaio:添加了配置