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
。为了能够提供一个答案,你需要更精确。嗯,耶-看起来我读的文档是指一个更旧的卡夫卡版本(应该考虑检查消费者和生产者的配置文档来检查)。这是我在读《卡夫卡权威指南》时想到的