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

  • 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.
主站蜘蛛池模板: 内黄县| 大兴区| 霍山县| 南木林县| 西昌市| 厦门市| 吉林省| 罗甸县| 临沭县| 天津市| 广饶县| 六枝特区| 山东| 林芝县| 华阴市| 永登县| 四川省| 屯昌县| 桐乡市| 共和县| 铜川市| 建水县| 霍林郭勒市| 甘南县| 佛坪县| 嫩江县| 景东| 汕尾市| 聂拉木县| 滁州市| 侯马市| 通辽市| 南乐县| 宜都市| 开江县| 庄浪县| 皮山县| 中卫市| 新乐市| 沙雅县| 南靖县|