confluent-kafka-dotnet
Show / Hide Table of Contents

Class DependentProducerBuilder<TKey, TValue>

A builder class for IProducer<TKey, TValue> instance implementations that leverage an existing client handle.

[API-SUBJECT-TO-CHANGE] - This class may be removed in the future in favor of an improved API for this functionality.

Inheritance
object
DependentProducerBuilder<TKey, TValue>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Confluent.Kafka
Assembly: Confluent.Kafka.dll
Syntax
public class DependentProducerBuilder<TKey, TValue>
Type Parameters
NameDescription
TKey
TValue

Constructors

DependentProducerBuilder(Handle)

An underlying librdkafka client handle that the Producer will use to make broker requests. The handle must be from another Producer instance (not Consumer or AdminClient).

Declaration
public DependentProducerBuilder(Handle handle)
Parameters
TypeNameDescription
Handlehandle

Properties

AsyncKeySerializer

The configured async key serializer.

Declaration
public IAsyncSerializer<TKey> AsyncKeySerializer { get; set; }
Property Value
TypeDescription
IAsyncSerializer<TKey>

AsyncValueSerializer

The configured async value serializer.

Declaration
public IAsyncSerializer<TValue> AsyncValueSerializer { get; set; }
Property Value
TypeDescription
IAsyncSerializer<TValue>

Handle

The configured client handle.

Declaration
public Handle Handle { get; set; }
Property Value
TypeDescription
Handle

KeySerializer

The configured key serializer.

Declaration
public ISerializer<TKey> KeySerializer { get; set; }
Property Value
TypeDescription
ISerializer<TKey>

ValueSerializer

The configured value serializer.

Declaration
public ISerializer<TValue> ValueSerializer { get; set; }
Property Value
TypeDescription
ISerializer<TValue>

Methods

Build()

Build a new IProducer implementation instance.

Declaration
public virtual IProducer<TKey, TValue> Build()
Returns
TypeDescription
IProducer<TKey, TValue>

SetKeySerializer(IAsyncSerializer<TKey>)

The async serializer to use to serialize keys.

Declaration
public DependentProducerBuilder<TKey, TValue> SetKeySerializer(IAsyncSerializer<TKey> serializer)
Parameters
TypeNameDescription
IAsyncSerializer<TKey>serializer
Returns
TypeDescription
DependentProducerBuilder<TKey, TValue>

SetKeySerializer(ISerializer<TKey>)

The serializer to use to serialize keys.

Declaration
public DependentProducerBuilder<TKey, TValue> SetKeySerializer(ISerializer<TKey> serializer)
Parameters
TypeNameDescription
ISerializer<TKey>serializer
Returns
TypeDescription
DependentProducerBuilder<TKey, TValue>

SetValueSerializer(IAsyncSerializer<TValue>)

The async serializer to use to serialize values.

Declaration
public DependentProducerBuilder<TKey, TValue> SetValueSerializer(IAsyncSerializer<TValue> serializer)
Parameters
TypeNameDescription
IAsyncSerializer<TValue>serializer
Returns
TypeDescription
DependentProducerBuilder<TKey, TValue>

SetValueSerializer(ISerializer<TValue>)

The serializer to use to serialize values.

Declaration
public DependentProducerBuilder<TKey, TValue> SetValueSerializer(ISerializer<TValue> serializer)
Parameters
TypeNameDescription
ISerializer<TValue>serializer
Returns
TypeDescription
DependentProducerBuilder<TKey, TValue>
In this article