Method | Description | |
---|---|---|
GetBytes ( ) : byte[] |
Converts the message to bytes in the format Kafka likes.
|
|
IsValid ( ) : bool |
Determines if the message is valid given the payload and its checksum.
|
|
Message ( byte payload ) : System |
Initializes a new instance of the Message class. Uses the DefaultMagicIdentifier as a default. |
|
Message ( byte payload, byte magic ) : System |
Initializes a new instance of the Message class. Initializes the checksum as null. It will be automatically computed. |
|
Message ( byte payload, byte magic, byte checksum ) : System |
Initializes a new instance of the Message class.
|
|
ParseFrom ( byte data ) : |
Parses a message from a byte array given the format Kafka likes.
|
|
ToString ( ) : string |
Try to show the payload as decoded to UTF-8.
|
Method | Description | |
---|---|---|
CalculateChecksum ( ) : byte[] |
Calculates the CRC32 checksum on the payload of the message.
|
public Message ( byte payload ) : System | ||
payload | byte | The data for the payload. |
return | System |
public Message ( byte payload, byte magic ) : System | ||
payload | byte | The data for the payload. |
magic | byte | The magic identifier. |
return | System |
public Message ( byte payload, byte magic, byte checksum ) : System | ||
payload | byte | The data for the payload. |
magic | byte | The magic identifier. |
checksum | byte | The checksum for the payload. |
return | System |
public static ParseFrom ( byte data ) : |
||
data | byte | The data for a message. |
return |