Skip to content

Message payload

g9yuayon edited this page Dec 9, 2013 · 8 revisions

Suro client communicates with Suro server using Apache Thrift(version 0.7.0). The payload of a Suro message is simply byte array. Users can provide their own serde and compression methods to interpret the byte array.

Message header contains the following information:

  • Application name: The name of the application that send out messages
  • Routing key: The key that identifies same kind of messages. It is used to route messages to different sinks too. It usually is the name of data source.
  • Compression: 0 means no compression, 1 means LZF compression. By default, LZF compression is used.
  • CRC: The CRC32 value of the message. This field can be used to check potential data corruption
Message body is a byte array. It's up to users to decide what the byte array means. Users can provide their serde implementation to serialize and deserialize payload, or provide their own compression algorithms.

Suro client sends MessageSet to its server. A MessageSet is a collection of messages. A MessageSet consists of same header of Message except routing key, and its body is a compressed byte array of all the all the batched messages.

You can create Message/MessageSet payload directly using MessgaeSetBuilder class.

Clone this wiki locally