public interface TransactionalProducerRegistry
Producer instances key by id and type.
The producer instance returned will have transactions initialized by executing Producer.initTransactions().| Modifier and Type | Method and Description |
|---|---|
void |
close(org.apache.kafka.clients.producer.Producer<?,?> producer)
Closed the producer.
|
<K,V> org.apache.kafka.clients.producer.Producer<K,V> |
getTransactionalProducer(java.lang.String clientId,
java.lang.String transactionalId,
io.micronaut.core.type.Argument<K> keyType,
io.micronaut.core.type.Argument<V> valueType)
Returns a transactional managed Producer.
|
@NonNull
<K,V> org.apache.kafka.clients.producer.Producer<K,V> getTransactionalProducer(@Nullable
java.lang.String clientId,
java.lang.String transactionalId,
io.micronaut.core.type.Argument<K> keyType,
io.micronaut.core.type.Argument<V> valueType)
K - The key generic typeV - The value generic typeclientId - The client id of the producer.transactionalId - The transactional id of the producer.keyType - The key typevalueType - The value typevoid close(@NonNull
org.apache.kafka.clients.producer.Producer<?,?> producer)
ProducerFencedException is thrown.producer - The producer