Implementation

Messages

qianmoQqianmoQ· 更新于 2026-10-19· 阅读 2 分钟· 0 次阅读

登录后可跨设备保存划线和私人笔记登录

You are viewing documentation for an older version (4.1) of Kafka. For up-to-date documentation, see the latest version.

Messages

Messages

Messages consist of a variable-length header, a variable-length opaque key byte array and a variable-length opaque value byte array. The format of the header is described in the following section. Leaving the key and value opaque is the right decision: there is a great deal of progress being made on serialization libraries right now, and any particular choice is unlikely to be right for all uses. Needless to say a particular application using Kafka would likely mandate a particular serialization type as part of its usage. The RecordBatch interface is simply an iterator over messages with specialized methods for bulk reading and writing to an NIO Channel.

Last modified December 19, 2025: Add license info to every source file and handle `documentation.html` links for all versioned paths. (devlive-community/knowforge#764) (379dba2230)

评论

登录后参与评论

正在加载评论…