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 fetch.max.message.bytes和max.message.bytes卡夫卡配置_Apache Kafka_Configuration - Fatal编程技术网

Apache kafka fetch.max.message.bytes和max.message.bytes卡夫卡配置

Apache kafka fetch.max.message.bytes和max.message.bytes卡夫卡配置,apache-kafka,configuration,Apache Kafka,Configuration,我对卡夫卡还是个新手,我不确定为什么会有一个最大消息大小的消费者和生产者参数。拥有两个参数似乎会引入开发人员可能忽略的错误(即将fetch.max.message.bytes设置为低于max.message.bytes)。一定有一个用例或设计模式我不知道,这促使Kafka团队保留这两个配置值。因此fetch.max.message.bytes不存在(至少在最新的Kafka版本中,您使用的是什么?),我想您指的是fetch.max.bytes。 无论如何,fetch.max.bytes和max.m

我对卡夫卡还是个新手,我不确定为什么会有一个最大消息大小的消费者和生产者参数。拥有两个参数似乎会引入开发人员可能忽略的错误(即将
fetch.max.message.bytes
设置为低于
max.message.bytes
)。一定有一个用例或设计模式我不知道,这促使Kafka团队保留这两个配置值。

因此fetch.max.message.bytes不存在(至少在最新的Kafka版本中,您使用的是什么?),我想您指的是fetch.max.bytes。 无论如何,fetch.max.bytes和max.message.bytes在代理上(不是生产者/消费者)。 max.message.bytes定义了消费者可以获得的每批消息的最大大小(您知道消息是以分组方式批处理的)。
fetch.max.bytes定义了消费者一次可以从代理获得多少批的最大限制;这不是一个硬限制,因为如果有更多的可用批次,代理将返回部分批次,直到最大值,以避免消费者卡住。

您使用的是哪个卡夫卡版本?此外,我在中的nor
max.message.bytes
中找不到
fetch.max.message.bytes
。为了能够提供一个答案,你需要更精确。嗯,耶-看起来我读的文档是指一个更旧的卡夫卡版本(应该考虑检查消费者和生产者的配置文档来检查)。这是我在读《卡夫卡权威指南》时想到的