本机电脑16g,内存使用信息如下,不管max-partition-fetch-bytes配置多大,只能拉到3万多条,一条消息数据大小为 136k
本次拉取消息条数:37269,处理总耗时:5055ms
电脑内存信息:PhysMem: 15G used (2749M wired), 798M unused.
配置信息:
max-poll-records: ${SPRING_KAFKA_CONSUMER_MAX_POLL_RECORDS:500000}
session-time-out: ${SPRING_KAFKA_CONSUMER_SESSION_TIME_OUT:300000}
max-poll-interval: ${SPRING_KAFKA_CONSUMER_MAX_POLL_INTERVAL:200000}
max-partition-fetch-bytes: ${SPRING_KAFKA_CONSUMER_MAX_PARTITION_FETCH_BYTES:52428800}
fetch-max-wait: ${SPRING_KAFKA_CONSUMER_FETCH_MAX_WAIT:10000}
heartbeat-interval: ${SPRING_KAFKA_CONSUMER_HEARTBEAT_INTERVAL:6666}
request-timeout-ms: ${REQUEST_TIMEOUT_MS_CONFIG:400000}
还有个时间的维度
fetch.max.wait.ms
参考来自:Kafka Consumer配置
你的答案