Spring Kafka applies core Spring concepts to the development of Kafka-based messaging solutions. It provides a “template” as a high-level abstraction for sending messages. It also provides support for Message-driven POJOs with @KafkaListener
annotations and a “listener container”. These libraries promote the use of dependency injection and declarative. In all of these cases, you will see similarities to the JMS support in the Spring Framework and RabbitMQ support in Spring AMQP.
Spring for Apache Kafka Samples
get started
1 |
|
启动类
1 |
|
KafkaAutoConfiguration
KafkaProperties
KafkaTemplate
ProducerListener
ReplyingKafkaTemplate
request/reply模式
@KafkaListener
ConsumerFactory
ProducerFactory
RecordMessageConverter
KafkaTransactionManager
KafkaJaasLoginModuleInitializer
KafkaAdmin
@SendTo
转发到指定topic