官术网_书友最值得收藏!

  • Spring 5.0 By Example
  • Claudio Eduardo de Oliveira
  • 155字
  • 2021-06-24 19:17:25

Spring for Apache Kafka

Spring for Apache Kafka supports the broker-based Apache Kafka applications. It provides a high-level API to interact with Apache Kafka. Internally, the projects use the Kafka Java APIs.

This module supports the annotation programming model. The basic idea is that with a couple of annotations and some POJO models, we can bootstrap the application and start listening to and producing messages.

KafkaTemplate is a central class of this project. It enables us to send messages to Apache Kafka with a high-level API. Asynchronous programming is supported as well.

This module offers support for transactions via annotations. This feature is enabled via standard transactional annotations used in Spring-based applications, such as @Transactional.

We also learned about Spring AMQP. This project adds the Spring concept of creating applications based on this broker. The dependency injection features are supported as well.

Some common annotations are  @EnableKafka and  @KafkaListener.
主站蜘蛛池模板: 泌阳县| 基隆市| 屯门区| 长春市| 广南县| 都安| 城口县| 凤庆县| 策勒县| 新和县| 翁牛特旗| 蒙山县| 鲁甸县| 宜宾县| 江口县| 贵港市| 交城县| 贵州省| 鸡泽县| 东丽区| 同心县| 泰兴市| 仲巴县| 诸城市| 铁岭市| 巴林左旗| 察隅县| 杭锦旗| 大渡口区| 昆山市| 江口县| 西和县| 漳州市| 云霄县| 泰安市| 大竹县| 建瓯市| 栖霞市| 莫力| 深圳市| 巫山县|