K
- The key deserializer typeV
- The value deserializer typepublic abstract class AbstractKafkaProducerConfiguration<K,V> extends AbstractKafkaConfiguration<K,V>
DEFAULT_BOOTSTRAP_SERVERS, DEFAULT_KAFKA_PORT, EMBEDDED, EMBEDDED_TOPICS, PREFIX
Modifier | Constructor and Description |
---|---|
protected |
AbstractKafkaProducerConfiguration(java.util.Properties config)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<org.apache.kafka.common.serialization.Serializer<K>> |
getKeySerializer() |
java.util.Optional<org.apache.kafka.common.serialization.Serializer<V>> |
getValueSerializer() |
void |
setKeySerializer(org.apache.kafka.common.serialization.Serializer<K> keySerializer)
Sets the key serializer.
|
void |
setValueSerializer(org.apache.kafka.common.serialization.Serializer<V> valueSerializer)
Sets the default value serializer.
|
getConfig
protected AbstractKafkaProducerConfiguration(java.util.Properties config)
config
- The config to usepublic java.util.Optional<org.apache.kafka.common.serialization.Serializer<K>> getKeySerializer()
Serializer
public void setKeySerializer(@Nullable org.apache.kafka.common.serialization.Serializer<K> keySerializer)
keySerializer
- The key serializerpublic java.util.Optional<org.apache.kafka.common.serialization.Serializer<V>> getValueSerializer()
Serializer
public void setValueSerializer(@Nullable org.apache.kafka.common.serialization.Serializer<V> valueSerializer)
valueSerializer
- The value serializer