C# Class Kafka.Client.Producer

Sends message to Kafka.
Afficher le fichier Open project: precog/kafka

Méthodes publiques

Méthode Description
Producer ( string server, int port ) : System

Initializes a new instance of the Producer class.

Send ( MultiProducerRequest request ) : void

Sends a request to Kafka.

Send ( ProducerRequest request ) : void

Sends a request to Kafka.

Send ( string topic, int partition, IList messages ) : void

Sends a list of messages to Kafka.

Send ( string topic, int partition, Message msg ) : void

Sends a message to Kafka.

SendAsync ( ProducerRequest request, MessageSent callback ) : void

Send a request to Kafka asynchronously.

If the callback is not specified then the method behaves as a fire-and-forget call with the callback being ignored. By the time this callback is executed, the RequestContext.NetworkStream will already have been closed given an internal call NetworkStream.EndWrite.

SendAsync ( string topic, int partition, IList messages, MessageSent callback ) : void

Sends a list of messages to Kafka.

Method Details

Producer() public méthode

Initializes a new instance of the Producer class.
public Producer ( string server, int port ) : System
server string The server to connect to.
port int The port to connect to.
Résultat System

Send() public méthode

Sends a request to Kafka.
public Send ( MultiProducerRequest request ) : void
request Kafka.Client.Request.MultiProducerRequest The request to send to Kafka.
Résultat void

Send() public méthode

Sends a request to Kafka.
public Send ( ProducerRequest request ) : void
request ProducerRequest The request to send to Kafka.
Résultat void

Send() public méthode

Sends a list of messages to Kafka.
public Send ( string topic, int partition, IList messages ) : void
topic string The topic to publish to.
partition int The partition to publish to.
messages IList The list of messages to send.
Résultat void

Send() public méthode

Sends a message to Kafka.
public Send ( string topic, int partition, Message msg ) : void
topic string The topic to publish to.
partition int The partition to publish to.
msg Message The message to send.
Résultat void

SendAsync() public méthode

Send a request to Kafka asynchronously.
If the callback is not specified then the method behaves as a fire-and-forget call with the callback being ignored. By the time this callback is executed, the RequestContext.NetworkStream will already have been closed given an internal call NetworkStream.EndWrite.
public SendAsync ( ProducerRequest request, MessageSent callback ) : void
request ProducerRequest The request to send to Kafka.
callback MessageSent /// A block of code to execute once the request has been sent to Kafka. This value may /// be set to null. ///
Résultat void

SendAsync() public méthode

Sends a list of messages to Kafka.
public SendAsync ( string topic, int partition, IList messages, MessageSent callback ) : void
topic string The topic to publish to.
partition int The partition to publish to.
messages IList The list of messages to send.
callback MessageSent /// A block of code to execute once the request has been sent to Kafka. This value may /// be set to null. ///
Résultat void