C# Class Kafka.Client.Messages.Message

Message send to Kafka server
Format: 1 byte "magic" identifier to allow format changes 4 byte CRC32 of the payload N - 5 byte payload
Inheritance: IWritable
Datei anzeigen Open project: precog/kafka Class Usage Examples

Public Methods

Method Description
Message ( byte payload ) : System

Initializes a new instance of the Message class.

Initializes the magic number as default and the checksum as null. It will be automatically computed.

Message ( byte payload, CompressionCodecs compressionCodec ) : System

Initializes a new instance of the Message class.

Initializes the checksum as null. It will be automatically computed.

Message ( byte payload, byte checksum ) : System

Initializes a new instance of the Message class.

Initializes with default magic number

Message ( byte payload, byte checksum, CompressionCodecs compressionCodec ) : System

Initializes a new instance of the Message class.

ToString ( ) : string

Try to show the payload as decoded to UTF-8.

WriteTo ( KafkaBinaryWriter writer ) : void

Writes message data using given writer

WriteTo ( MemoryStream output ) : void

Writes message data into given message buffer

Private Methods

Method Description
FromMessageBytes ( byte data ) : Message
ParseFrom ( KafkaBinaryReader reader, int size ) : Message
ParseFrom ( byte data ) : Message

Method Details

Message() public method

Initializes a new instance of the Message class.
Initializes the magic number as default and the checksum as null. It will be automatically computed.
public Message ( byte payload ) : System
payload byte /// The payload. ///
return System

Message() public method

Initializes a new instance of the Message class.
Initializes the checksum as null. It will be automatically computed.
public Message ( byte payload, CompressionCodecs compressionCodec ) : System
payload byte The data for the payload.
compressionCodec CompressionCodecs
return System

Message() public method

Initializes a new instance of the Message class.
Initializes with default magic number
public Message ( byte payload, byte checksum ) : System
payload byte /// The payload. ///
checksum byte /// The checksum. ///
return System

Message() public method

Initializes a new instance of the Message class.
public Message ( byte payload, byte checksum, CompressionCodecs compressionCodec ) : System
payload byte The data for the payload.
checksum byte The checksum for the payload.
compressionCodec CompressionCodecs
return System

ToString() public method

Try to show the payload as decoded to UTF-8.
public ToString ( ) : string
return string

WriteTo() public method

Writes message data using given writer
public WriteTo ( KafkaBinaryWriter writer ) : void
writer Kafka.Client.Serialization.KafkaBinaryWriter /// The writer. ///
return void

WriteTo() public method

Writes message data into given message buffer
public WriteTo ( MemoryStream output ) : void
output System.IO.MemoryStream /// The output. ///
return void