Table of Contents

Class KafkaProducerExtensions

Namespace
MASES.KNet.Extensions
Assembly
MASES.KNet.dll

Extension for KafkaProducer

public static class KafkaProducerExtensions
Inheritance
KafkaProducerExtensions
Inherited Members

Methods

Configs(NewTopic, TopicConfigBuilder)

Apply config to newTopic

public static NewTopic Configs(this NewTopic newTopic, TopicConfigBuilder config)

Parameters

newTopic NewTopic

The NewTopic to configure

config TopicConfigBuilder

The TopicConfigBuilder with configuration

Returns

NewTopic

The updated NewTopic

ProduceAsync<K, V>(IProducer<K, V>, ProducerRecord<K, V>, Action<RecordMetadata, JVMBridgeException>)

Produce async version of Send(ProducerRecord<K, V>)

public static Task ProduceAsync<K, V>(this IProducer<K, V> producer, ProducerRecord<K, V> record, Action<RecordMetadata, JVMBridgeException> action = null)

Parameters

producer IProducer<K, V>
record ProducerRecord<K, V>
action Action<RecordMetadata, JVMBridgeException>

Returns

Task

Type Parameters

K
V

ProduceAsync<K, V>(IProducer<K, V>, string, int, DateTime, K, V, Action<RecordMetadata, JVMBridgeException>)

Produce async version of Send(ProducerRecord<K, V>)

public static Task ProduceAsync<K, V>(this IProducer<K, V> producer, string topic, int partition, DateTime timestamp, K key, V value, Action<RecordMetadata, JVMBridgeException> action = null)

Parameters

producer IProducer<K, V>
topic string
partition int
timestamp DateTime
key K
value V
action Action<RecordMetadata, JVMBridgeException>

Returns

Task

Type Parameters

K
V

ProduceAsync<K, V>(IProducer<K, V>, string, int, long, K, V, Action<RecordMetadata, JVMBridgeException>)

Produce async version of Send(ProducerRecord<K, V>)

public static Task ProduceAsync<K, V>(this IProducer<K, V> producer, string topic, int partition, long timestamp, K key, V value, Action<RecordMetadata, JVMBridgeException> action = null)

Parameters

producer IProducer<K, V>
topic string
partition int
timestamp long
key K
value V
action Action<RecordMetadata, JVMBridgeException>

Returns

Task

Type Parameters

K
V

ProduceAsync<K, V>(IProducer<K, V>, string, int, K, V, Action<RecordMetadata, JVMBridgeException>)

Produce async version of Send(ProducerRecord<K, V>)

public static Task ProduceAsync<K, V>(this IProducer<K, V> producer, string topic, int partition, K key, V value, Action<RecordMetadata, JVMBridgeException> action = null)

Parameters

producer IProducer<K, V>
topic string
partition int
key K
value V
action Action<RecordMetadata, JVMBridgeException>

Returns

Task

Type Parameters

K
V

ProduceAsync<K, V>(IProducer<K, V>, string, K, V, Action<RecordMetadata, JVMBridgeException>)

Produce async version of Send(ProducerRecord<K, V>)

public static Task ProduceAsync<K, V>(this IProducer<K, V> producer, string topic, K key, V value, Action<RecordMetadata, JVMBridgeException> action = null)

Parameters

producer IProducer<K, V>
topic string
key K
value V
action Action<RecordMetadata, JVMBridgeException>

Returns

Task

Type Parameters

K
V

Produce<K, V>(IProducer<K, V>, ProducerRecord<K, V>, Callback)

Produce version of Send(ProducerRecord<K, V>)

public static void Produce<K, V>(this IProducer<K, V> producer, ProducerRecord<K, V> record, Callback cb = null)

Parameters

producer IProducer<K, V>
record ProducerRecord<K, V>
cb Callback

Type Parameters

K
V

Produce<K, V>(IProducer<K, V>, ProducerRecord<K, V>, Action<RecordMetadata, JVMBridgeException>)

Produce version of Send(ProducerRecord<K, V>)

public static void Produce<K, V>(this IProducer<K, V> producer, ProducerRecord<K, V> record, Action<RecordMetadata, JVMBridgeException> action = null)

Parameters

producer IProducer<K, V>
record ProducerRecord<K, V>
action Action<RecordMetadata, JVMBridgeException>

Type Parameters

K
V

Produce<K, V>(IProducer<K, V>, string, int, DateTime, K, V, Callback)

Produce version of Send(ProducerRecord<K, V>)

public static void Produce<K, V>(this IProducer<K, V> producer, string topic, int partition, DateTime timestamp, K key, V value, Callback cb = null)

Parameters

producer IProducer<K, V>
topic string
partition int
timestamp DateTime
key K
value V
cb Callback

Type Parameters

K
V

Produce<K, V>(IProducer<K, V>, string, int, DateTime, K, V, Action<RecordMetadata, JVMBridgeException>)

Produce version of Send(ProducerRecord<K, V>)

public static void Produce<K, V>(this IProducer<K, V> producer, string topic, int partition, DateTime timestamp, K key, V value, Action<RecordMetadata, JVMBridgeException> action = null)

Parameters

producer IProducer<K, V>
topic string
partition int
timestamp DateTime
key K
value V
action Action<RecordMetadata, JVMBridgeException>

Type Parameters

K
V

Produce<K, V>(IProducer<K, V>, string, int, long, K, V, Callback)

Produce version of Send(ProducerRecord<K, V>)

public static void Produce<K, V>(this IProducer<K, V> producer, string topic, int partition, long timestamp, K key, V value, Callback cb = null)

Parameters

producer IProducer<K, V>
topic string
partition int
timestamp long
key K
value V
cb Callback

Type Parameters

K
V

Produce<K, V>(IProducer<K, V>, string, int, long, K, V, Action<RecordMetadata, JVMBridgeException>)

Produce version of Send(ProducerRecord<K, V>)

public static void Produce<K, V>(this IProducer<K, V> producer, string topic, int partition, long timestamp, K key, V value, Action<RecordMetadata, JVMBridgeException> action = null)

Parameters

producer IProducer<K, V>
topic string
partition int
timestamp long
key K
value V
action Action<RecordMetadata, JVMBridgeException>

Type Parameters

K
V

Produce<K, V>(IProducer<K, V>, string, int, K, V, Callback)

Produce version of Send(ProducerRecord<K, V>)

public static void Produce<K, V>(this IProducer<K, V> producer, string topic, int partition, K key, V value, Callback cb = null)

Parameters

producer IProducer<K, V>
topic string
partition int
key K
value V
cb Callback

Type Parameters

K
V

Produce<K, V>(IProducer<K, V>, string, int, K, V, Action<RecordMetadata, JVMBridgeException>)

Produce version of Send(ProducerRecord<K, V>)

public static void Produce<K, V>(this IProducer<K, V> producer, string topic, int partition, K key, V value, Action<RecordMetadata, JVMBridgeException> action = null)

Parameters

producer IProducer<K, V>
topic string
partition int
key K
value V
action Action<RecordMetadata, JVMBridgeException>

Type Parameters

K
V

Produce<K, V>(IProducer<K, V>, string, K, V, Callback)

Produce version of Send(ProducerRecord<K, V>)

public static void Produce<K, V>(this IProducer<K, V> producer, string topic, K key, V value, Callback cb = null)

Parameters

producer IProducer<K, V>
topic string
key K
value V
cb Callback

Type Parameters

K
V

Produce<K, V>(IProducer<K, V>, string, K, V, Action<RecordMetadata, JVMBridgeException>)

Produce version of Send(ProducerRecord<K, V>)

public static void Produce<K, V>(this IProducer<K, V> producer, string topic, K key, V value, Action<RecordMetadata, JVMBridgeException> action = null)

Parameters

producer IProducer<K, V>
topic string
key K
value V
action Action<RecordMetadata, JVMBridgeException>

Type Parameters

K
V