K - the key of produced messagesV - the value of produced messagespublic interface Producer<K,V>
extends java.lang.AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection, the connection is re-opened after produce is called, or if after a
failed attempt to produce a retry is called.
|
java.util.concurrent.Future<ProducedMessage<K,V>> |
produce(ProducerMessage<K,V> message)
Method used to produce records, the implementation is dependent on the strategy
|
java.util.concurrent.Future<ProducedMessage<K,V>> |
produce(ProducerMessage<K,V> message,
ProduceCallback<K,V> callback)
Method used to produce records, the implementation is dependent on the strategy
|
java.util.concurrent.Future<ProducedMessage<K,V>> produce(ProducerMessage<K,V> message)
message - the message to be produced.GenericProducedMessage or a ExecutionException if the produce execution failedjava.util.concurrent.Future<ProducedMessage<K,V>> produce(ProducerMessage<K,V> message, ProduceCallback<K,V> callback)
message - the message to be producedcallback - the callback implementation to be used to notify the producing applicationProducedMessage or a ExecutionException if the produce execution failedvoid close()
close in interface java.lang.AutoCloseableCopyright © 2020–2021 Axual B.V.. All rights reserved.