消息在 Apache Kafka 中被截断 [英] Message got truncated in Apache Kafka
问题描述
我是 kafka 的新手,我已经在本地安装了带有默认配置的 kafka 10.现在,我面临一个问题.我正在从控制台生产者那里产生消息.如果消息大约为 4096 字节.然后,它被控制台消费者很好地消费.但是当我将消息大小从 4096 字节增加时.然后,在使用它时消息被截断到大约 4096 字节.我没有遇到问题.
I'm new in kafka, I've installed kafka 10 with default configs on local. Now, i'm facing a problem. I'm producing message from console producer. If message is around 4096 Bytes. Then, it is consumed fine from console consumer. But when i increase message size from 4096 Bytes.Then, on consuming it message is truncated to around 4096 Bytes. I'm not getting the problem.
发生了什么?a) 消息是否发布不完整.b) 消息是否消费不完全.
What is happening ? a) Is message is published incompletely. b) Is message is consumed incompletely.
注意:我没有对默认设置进行任何更改,我使用的是控制台生产者和消费者.
Note : I've not done any change in default settings and i am using console producer and consumer.
请大家帮忙
推荐答案
可能是因为您使用控制台生产者并将消息复制到终端(linux)但终端将长消息截断为最大固定长度而发生的问题.
May be the problem occurring because you are using console producer and copying the message to terminal(linux) but terminal truncate long message to a maximum fixed length.
这篇关于消息在 Apache Kafka 中被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!