-
Notifications
You must be signed in to change notification settings - Fork 171
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
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.