KafkaTemplate类的send(String topic, V data)方法

send方法

public CompletableFuture<SendResult<K,V>> send(String topic, @Nullable V data)

Description copied from interface: KafkaOperations

将数据发送到没有键或分区的指定主题。
Send the data to the provided topic with no key or partition.

Specified by: send in interface KafkaOperations<K,V>
Parameters:

  • topic - the topic.
  • data - The data.

Returns:
a Future for the SendResult.

posted @ 2025-04-26 16:05  kuki'  阅读(99)  评论(0)    收藏  举报