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
System.Object
DependentProducerBuilder<TKey, TValue>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Confluent.Kafka
Assembly: cs.temp.dll.dll
Syntax
public class DependentProducerBuilder<TKey, TValue>
Type Parameters
Name Description
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
Type Name Description
Handle handle

Properties

AsyncKeySerializer

The configured async key serializer.

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

AsyncValueSerializer

The configured async value serializer.

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

Handle

The configured client handle.

Declaration
public Handle Handle { get; set; }
Property Value
Type Description
Handle

KeySerializer

The configured key serializer.

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

ValueSerializer

The configured value serializer.

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

Methods

Build()

Build a new IProducer implementation instance.

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

SetKeySerializer(IAsyncSerializer<TKey>)

The async serializer to use to serialize keys.

Declaration
public DependentProducerBuilder<TKey, TValue> SetKeySerializer(IAsyncSerializer<TKey> serializer)
Parameters
Type Name Description
IAsyncSerializer<TKey> serializer
Returns
Type Description
DependentProducerBuilder<TKey, TValue>

SetKeySerializer(ISerializer<TKey>)

The serializer to use to serialize keys.

Declaration
public DependentProducerBuilder<TKey, TValue> SetKeySerializer(ISerializer<TKey> serializer)
Parameters
Type Name Description
ISerializer<TKey> serializer
Returns
Type Description
DependentProducerBuilder<TKey, TValue>

SetValueSerializer(IAsyncSerializer<TValue>)

The async serializer to use to serialize values.

Declaration
public DependentProducerBuilder<TKey, TValue> SetValueSerializer(IAsyncSerializer<TValue> serializer)
Parameters
Type Name Description
IAsyncSerializer<TValue> serializer
Returns
Type Description
DependentProducerBuilder<TKey, TValue>

SetValueSerializer(ISerializer<TValue>)

The serializer to use to serialize values.

Declaration
public DependentProducerBuilder<TKey, TValue> SetValueSerializer(ISerializer<TValue> serializer)
Parameters
Type Name Description
ISerializer<TValue> serializer
Returns
Type Description
DependentProducerBuilder<TKey, TValue>
In This Article