C# Class Kafka.Client.Requests.ProducerRequest

Constructs a request to send to Kafka.
Inheritance: AbstractRequest, IWritable
Exibir arquivo Open project: precog/kafka Class Usage Examples

Public Methods

Method Description
GetRequestLength ( string topic, int messegesSize, string encoding = DefaultEncoding ) : int
ProducerRequest ( string topic, int partition, Kafka.Client.Messages.BufferedMessageSet messages ) : System
ProducerRequest ( string topic, int partition, IEnumerable messages ) : System

Initializes a new instance of the ProducerRequest class.

ToString ( ) : string
WriteTo ( KafkaBinaryWriter writer ) : void

Writes content into given writer

WriteTo ( MemoryStream output ) : void

Writes content into given stream

Method Details

GetRequestLength() public static method

public static GetRequestLength ( string topic, int messegesSize, string encoding = DefaultEncoding ) : int
topic string
messegesSize int
encoding string
return int

ProducerRequest() public method

public ProducerRequest ( string topic, int partition, Kafka.Client.Messages.BufferedMessageSet messages ) : System
topic string
partition int
messages Kafka.Client.Messages.BufferedMessageSet
return System

ProducerRequest() public method

Initializes a new instance of the ProducerRequest class.
public ProducerRequest ( string topic, int partition, IEnumerable messages ) : System
topic string The topic to publish to.
partition int The partition to publish to.
messages IEnumerable The list of messages to send.
return System

ToString() public method

public ToString ( ) : string
return string

WriteTo() public method

Writes content into given writer
public WriteTo ( KafkaBinaryWriter writer ) : void
writer Kafka.Client.Serialization.KafkaBinaryWriter /// The writer. ///
return void

WriteTo() public method

Writes content into given stream
public WriteTo ( MemoryStream output ) : void
output System.IO.MemoryStream /// The output stream. ///
return void