K - the key type.V - the value type.public interface KafkaOperations<K,V>
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> |
convertAndSend(int partition,
K key,
V data)
Send the data to the default topic with the provided key and partition.
|
java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> |
convertAndSend(K key,
V data)
Send the data to the default topic with the provided key and no partition.
|
java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> |
convertAndSend(java.lang.String topic,
int partition,
K key,
V data)
Send the data to the provided topic with the provided key and partition.
|
java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> |
convertAndSend(java.lang.String topic,
K key,
V data)
Send the data to the provided topic with the provided key and no partition.
|
java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> |
convertAndSend(java.lang.String topic,
V data)
Send the data to the provided topic with no key or partition.
|
java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> |
convertAndSend(V data)
Send the data to the default topic with no key or partition.
|
void |
flush()
Flush the producer.
|
org.apache.kafka.clients.producer.RecordMetadata |
syncConvertAndSend(int partition,
K key,
V data)
Send the data to the default topic with the provided key and partition.
|
org.apache.kafka.clients.producer.RecordMetadata |
syncConvertAndSend(K key,
V data)
Send the data to the default topic with the provided key and no partition;
wait for result.
|
org.apache.kafka.clients.producer.RecordMetadata |
syncConvertAndSend(java.lang.String topic,
int partition,
K key,
V data)
Send the data to the provided topic with the provided key and partition;
wait for result.
|
org.apache.kafka.clients.producer.RecordMetadata |
syncConvertAndSend(java.lang.String topic,
K key,
V data)
Send the data to the provided topic with the provided key and no partition;
wait for result.
|
org.apache.kafka.clients.producer.RecordMetadata |
syncConvertAndSend(java.lang.String topic,
V data)
Send the data to the provided topic with no key or partition.;
wait for result.
|
org.apache.kafka.clients.producer.RecordMetadata |
syncConvertAndSend(V data)
Send the data to the default topic with no key or partition;
wait for result.
|
java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> convertAndSend(V data)
data - The data.RecordMetadata.java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> convertAndSend(K key, V data)
key - the key.data - The data.RecordMetadata.java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> convertAndSend(int partition,
K key,
V data)
partition - the partition.key - the key.data - the data.RecordMetadata.java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> convertAndSend(java.lang.String topic,
V data)
topic - the topic.data - The data.RecordMetadata.java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> convertAndSend(java.lang.String topic,
K key,
V data)
topic - the topic.key - the key.data - The data.RecordMetadata.java.util.concurrent.Future<org.apache.kafka.clients.producer.RecordMetadata> convertAndSend(java.lang.String topic,
int partition,
K key,
V data)
topic - the topic.partition - the partition.key - the key.data - the data.RecordMetadata.org.apache.kafka.clients.producer.RecordMetadata syncConvertAndSend(V data) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
data - The data.RecordMetadata.java.util.concurrent.ExecutionException - execution exception while awaiting result.java.lang.InterruptedException - thread interrupted while awaiting result.org.apache.kafka.clients.producer.RecordMetadata syncConvertAndSend(K key, V data) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
key - the key.data - The data.RecordMetadata.java.util.concurrent.ExecutionException - execution exception while awaiting result.java.lang.InterruptedException - thread interrupted while awaiting result.org.apache.kafka.clients.producer.RecordMetadata syncConvertAndSend(int partition,
K key,
V data)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
partition - the partition.key - the key.data - the data.RecordMetadata.java.util.concurrent.ExecutionException - execution exception while awaiting result.java.lang.InterruptedException - thread interrupted while awaiting result.org.apache.kafka.clients.producer.RecordMetadata syncConvertAndSend(java.lang.String topic,
V data)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
topic - the topic.data - The data.RecordMetadata.java.util.concurrent.ExecutionException - execution exception while awaiting result.java.lang.InterruptedException - thread interrupted while awaiting result.org.apache.kafka.clients.producer.RecordMetadata syncConvertAndSend(java.lang.String topic,
K key,
V data)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
topic - the topic.key - the key.data - The data.RecordMetadata.java.util.concurrent.ExecutionException - execution exception while awaiting result.java.lang.InterruptedException - thread interrupted while awaiting result.org.apache.kafka.clients.producer.RecordMetadata syncConvertAndSend(java.lang.String topic,
int partition,
K key,
V data)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
topic - the topic.partition - the partition.key - the key.data - the data.RecordMetadata.java.util.concurrent.ExecutionException - execution exception while awaiting result.java.lang.InterruptedException - thread interrupted while awaiting result.void flush()