Skip to content

Commit e9aa11a

Browse files
committed
GH-352: Add General send() with ProducerRecord
(cherry picked from commit dc8c32e without KafkaOperations change)
1 parent f99fe20 commit e9aa11a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

spring-kafka/src/main/java/org/springframework/kafka/core/KafkaTemplate.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ public ListenableFuture<SendResult<K, V>> send(String topic, int partition, K ke
169169
return doSend(producerRecord);
170170
}
171171

172+
public ListenableFuture<SendResult<K, V>> send(ProducerRecord<K, V> record) {
173+
return doSend(record);
174+
}
175+
172176
@SuppressWarnings("unchecked")
173177
@Override
174178
public ListenableFuture<SendResult<K, V>> send(Message<?> message) {

src/reference/asciidoc/kafka.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ ListenableFuture<SendResult<K, V>> send(String topic, int partition, V data);
2525
2626
ListenableFuture<SendResult<K, V>> send(String topic, int partition, K key, V data);
2727
28+
ListenableFuture<SendResult<K, V>> send(ProducerRecord<K, V> record);
29+
2830
ListenableFuture<SendResult<K, V>> send(Message<?> message);
2931
3032
Map<MetricName, ? extends Metric> metrics();

0 commit comments

Comments
 (0)