kafka消息

半兽人 发表于: 2015-03-10   最后更新时间: 2017-03-13  
  •   95 订阅,5389 游览

5.3 消息

Messages consist of a fixed-size header and variable length opaque byte array payload. The header contains a format version and a CRC32 checksum to detect corruption or truncation. Leaving the payload 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. TheMessageSetinterface is simply an iterator over messages with specialized methods for bulk reading and writing to an NIOChannel.
消息由一个固定大小的消息头和可变长度但不透明的字节数组构成。消息头包含了格式版本和CRC32验证来检测损坏或截断。淘汰不透明负载消息是一个正确的决定:任何特定的选择不可能适合所有的用途。kafka提供一个特定的序列化类为其使用。MessageSet接口是一个简单的迭代器,通过特定以块为单元读写NIO 通道的方法遍历消息。







发表于: 1年前   最后更新时间: 4月前   游览量:5389
上一条: kafka网络层
下一条: kafka消息格式
评论…

  • Messages consist of a fixed-size header and variable length opaque byte array payload. 
    消息包含固定长度的消息头和不透明的可变长度字节数组
    TheMessageSetinterface is simply an iterator over messages with specialized methods for bulk reading and writing to an NIOChannel.
    MessageSet接口是简单迭代器,通过特定以块为单元读写NIO 通道的方法遍历消息
  • 评论…
    • in this conversation
      提问