K
- key class to sendV
- value class to sendpublic interface MessageProducer<K,V>
Modifier and Type | Method and Description |
---|---|
default void |
flush()
This method is a blank default implementation in order to avoid it being a breaking change.
|
java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> |
send(K key,
V value)
Asynchronously send a record to a specific topic
|
java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> |
send(K key,
V value,
org.apache.kafka.common.header.Headers headers) |
java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> send(K key, V value)
key
- key to sendvalue
- value to sendRecordMetadata
specifying the partition the record
was sent to, the offset it was assigned and the timestamp of the record.java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> send(K key, V value, org.apache.kafka.common.header.Headers headers)
default void flush()