KafkaTemplate<K,V> spring class

https://docs.spring.io/spring-kafka/api/org/springframework/kafka/core/KafkaTemplate.html

class KafkaTemplate<K,V>

public class KafkaTemplate<K,V>
extends Object
implements KafkaOperations<K,V>, ApplicationContextAware, BeanNameAware, ApplicationListener, DisposableBean, SmartInitializingSingleton

用于执行高级操作的模板。与 DefaultKafkaProducerFactory 一起使用时,该模板是线程安全的。生产者工厂和 KafkaProducer 确保了这一点;请参阅它们各自的 javadoc。
A template for executing high-level operations. When used with a DefaultKafkaProducerFactory, the template is thread-safe. The producer factory and KafkaProducer ensure this; refer to their respective javadocs.

posted @ 2025-04-26 15:55  kuki'  阅读(12)  评论(0)    收藏  举报