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.
Inherited Members
Namespace: Confluent.Kafka
Assembly: Confluent.Kafka.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> |
AsyncKeySerializerBuilder
EXPERIMENTAL: subject to change or removal.
The configured async key serializer builder.
Declaration
public IAsyncSerializerBuilder<TKey> AsyncKeySerializerBuilder { get; set; }
Property Value
| Type | Description |
|---|---|
| IAsyncSerializerBuilder<TKey> |
AsyncValueSerializer
The configured async value serializer.
Declaration
public IAsyncSerializer<TValue> AsyncValueSerializer { get; set; }
Property Value
| Type | Description |
|---|---|
| IAsyncSerializer<TValue> |
AsyncValueSerializerBuilder
EXPERIMENTAL: subject to change or removal.
The configured async value serializer builder.
Declaration
public IAsyncSerializerBuilder<TValue> AsyncValueSerializerBuilder { get; set; }
Property Value
| Type | Description |
|---|---|
| IAsyncSerializerBuilder<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> |
KeySerializerBuilder
EXPERIMENTAL: subject to change or removal.
The configured key serializer builder.
Declaration
public ISerializerBuilder<TKey> KeySerializerBuilder { get; set; }
Property Value
| Type | Description |
|---|---|
| ISerializerBuilder<TKey> |
ValueSerializer
The configured value serializer.
Declaration
public ISerializer<TValue> ValueSerializer { get; set; }
Property Value
| Type | Description |
|---|---|
| ISerializer<TValue> |
ValueSerializerBuilder
EXPERIMENTAL: subject to change or removal.
The configured value serializer builder.
Declaration
public ISerializerBuilder<TValue> ValueSerializerBuilder { get; set; }
Property Value
| Type | Description |
|---|---|
| ISerializerBuilder<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> |
SetKeySerializerBuilder(IAsyncSerializerBuilder<TKey>)
EXPERIMENTAL: subject to change or removal.
The builder of the async serializer to use to serialize keys.
In contrast to SetKeySerializer(IAsyncSerializer<TKey>), the serializer is constructed by the producer, which supplies the configuration of the producer owning the handle to the builder. A serializer constructed this way is owned by the dependent producer and is disposed along with it.
Declaration
public DependentProducerBuilder<TKey, TValue> SetKeySerializerBuilder(IAsyncSerializerBuilder<TKey> serializerBuilder)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsyncSerializerBuilder<TKey> | serializerBuilder |
Returns
| Type | Description |
|---|---|
| DependentProducerBuilder<TKey, TValue> |
SetKeySerializerBuilder(ISerializerBuilder<TKey>)
EXPERIMENTAL: subject to change or removal.
The builder of the serializer to use to serialize keys.
In contrast to SetKeySerializer(ISerializer<TKey>), the serializer is constructed by the producer, which supplies the configuration of the producer owning the handle to the builder. A serializer constructed this way is owned by the dependent producer and is disposed along with it.
Declaration
public DependentProducerBuilder<TKey, TValue> SetKeySerializerBuilder(ISerializerBuilder<TKey> serializerBuilder)
Parameters
| Type | Name | Description |
|---|---|---|
| ISerializerBuilder<TKey> | serializerBuilder |
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> |
SetValueSerializerBuilder(IAsyncSerializerBuilder<TValue>)
EXPERIMENTAL: subject to change or removal.
The builder of the async serializer to use to serialize values.
In contrast to SetValueSerializer(IAsyncSerializer<TValue>), the serializer is constructed by the producer, which supplies the configuration of the producer owning the handle to the builder. A serializer constructed this way is owned by the dependent producer and is disposed along with it.
Declaration
public DependentProducerBuilder<TKey, TValue> SetValueSerializerBuilder(IAsyncSerializerBuilder<TValue> serializerBuilder)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsyncSerializerBuilder<TValue> | serializerBuilder |
Returns
| Type | Description |
|---|---|
| DependentProducerBuilder<TKey, TValue> |
SetValueSerializerBuilder(ISerializerBuilder<TValue>)
EXPERIMENTAL: subject to change or removal.
The builder of the serializer to use to serialize values.
In contrast to SetValueSerializer(ISerializer<TValue>), the serializer is constructed by the producer, which supplies the configuration of the producer owning the handle to the builder. A serializer constructed this way is owned by the dependent producer and is disposed along with it.
Declaration
public DependentProducerBuilder<TKey, TValue> SetValueSerializerBuilder(ISerializerBuilder<TValue> serializerBuilder)
Parameters
| Type | Name | Description |
|---|---|---|
| ISerializerBuilder<TValue> | serializerBuilder |
Returns
| Type | Description |
|---|---|
| DependentProducerBuilder<TKey, TValue> |