K - the key type.V - the value type.public interface ProducerFactory<K,V>
Producer instance(s).| Modifier and Type | Method and Description |
|---|---|
default void |
closeProducerFor(java.lang.String transactionIdSuffix)
Remove the specified producer from the cache and close it.
|
default void |
closeThreadBoundProducer()
If the factory implementation uses thread-bound producers, call this method to
close and release this thread's producer.
|
org.apache.kafka.clients.producer.Producer<K,V> |
createProducer()
Create a producer.
|
default org.apache.kafka.clients.producer.Producer<K,V> |
createProducer(java.lang.String txIdPrefix)
Create a producer with an overridden transaction id prefix.
|
default java.util.Map<java.lang.String,java.lang.Object> |
getConfigurationProperties()
Return an unmodifiable reference to the configuration map for this factory.
|
default boolean |
isProducerPerConsumerPartition()
Return the producerPerConsumerPartition.
|
default boolean |
transactionCapable()
Return true if the factory supports transactions.
|
org.apache.kafka.clients.producer.Producer<K,V> createProducer()
default org.apache.kafka.clients.producer.Producer<K,V> createProducer(java.lang.String txIdPrefix)
txIdPrefix - the transaction id prefix.default boolean transactionCapable()
default void closeProducerFor(java.lang.String transactionIdSuffix)
transactionIdSuffix - the producer's transaction id suffix.default boolean isProducerPerConsumerPartition()
default void closeThreadBoundProducer()
default java.util.Map<java.lang.String,java.lang.Object> getConfigurationProperties()