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
NewTopicThe NewTopic to configure
config
TopicConfigBuilderThe TopicConfigBuilder with configuration
Returns
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
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
stringpartition
inttimestamp
DateTimekey
Kvalue
Vaction
Action<RecordMetadata, JVMBridgeException>
Returns
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
stringpartition
inttimestamp
longkey
Kvalue
Vaction
Action<RecordMetadata, JVMBridgeException>
Returns
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
stringpartition
intkey
Kvalue
Vaction
Action<RecordMetadata, JVMBridgeException>
Returns
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
stringkey
Kvalue
Vaction
Action<RecordMetadata, JVMBridgeException>
Returns
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
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
stringpartition
inttimestamp
DateTimekey
Kvalue
Vaction
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
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
stringpartition
inttimestamp
longkey
Kvalue
Vaction
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
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
stringpartition
intkey
Kvalue
Vaction
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
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
stringkey
Kvalue
Vaction
Action<RecordMetadata, JVMBridgeException>
Type Parameters
K
V