Kafka-spring-boot-starter: encapsulated based on spring-kafka

Overview

中文

Mybatis-Plus-Logo

Encapsulation based on spring-kafka not only supports native configuration, but also adds multi data source configuration.

maven code style

Intro

Kafka-spring-boot-starter is encapsulated based on spring-kafka. In addition to supporting native configuration, it also adds multi data source configuration.

QQ:908942659 ; wechat:xin2014555

Install

<dependency>
  <groupId>io.github.pg-liudonggroupId>
  <artifactId>kafka-spring-boot-starterartifactId>
  <version>1.0.0version>
dependency>

Features

  • Support native: Support spring-kafka native configuration.
spring:
  kafka:
    bootstrap-servers: localhost:9092
    consumer:
      key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      auto-offset-reset: earliest
    producer:
      key-serializer: org.apache.kafka.common.serialization.StringSerializer
      value-serializer: org.apache.kafka.common.serialization.StringSerializer
  • Support multiple data sources: Support multi data source configuration.(The smaller the configuration granularity, the higher the priority)
spring:
  kafka:
    multiple:
      # Primary data source is not allowed to be empty.
      primary: ds1  
      consumer:
        key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
        value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
        auto-offset-reset: latest
      producer:
        key-serializer: org.apache.kafka.common.serialization.StringSerializer
        value-serializer: org.apache.kafka.common.serialization.StringSerializer
      datasource:
        ds1:
          bootstrap-servers: localhost:9092
          consumer:
            # Consumer concurrent kafka listener container factory is not allowed to be empty.
            container-factory: ds1KafkaListenerContainerFactory  
            auto-offset-reset: earliest
          producer:
            kafka-template: ds1KafkaTemplate
        ds2:
          bootstrap-servers: localhost:9093
          consumer:
            container-factory: ds2KafkaListenerContainerFactory
            auto-offset-reset: earliest
          producer:
            # Producer kafka template bean name is not allowed to be empty.
            kafka-template: ds2KafkaTemplate 

Demo

Donate

If you think the plug-in is great and saves you a lot of time, invite the author to have a cup of coffee~ , Thank you. Your support is the driving force to encourage us to move forward. No matter how much it is, it is enough to express your intention.

微信 支付宝 Paypal

WeChat official account

Irregularly share the dry notes of programming technology, not limited to algorithms, databases, spring boot, microservices, high concurrency, JVM, docker, elk, programming skills and other related knowledge. We look forward to making progress with you!

微信公众号
You might also like...

Get or Throw Spring boot Starter will help you to hide handling if entity not found.

Get or Throw Spring boot Starter Get or Throw Spring boot Starter will help you to hide handling if entity not found. 1. Setup 2. Usage Library adds c

Feb 2, 2022

本项目基于springboot进行开发,实现了一系列的spring-boot-starter

项目简介 本项目基于springboot进行开发,实现了一系列的spring-boot-starter,可以作为开发中的工具包进行使用。 模块划分 common-spring-boot-starter:常用的基础类,比如用作消息流转的Msg以及一些工具类 monitor-spring-boot-st

Jan 24, 2022

End to End project for Kafka Streams using Spring Cloud Kafka streams

End to End project for Kafka Streams using Spring Cloud Kafka streams

Spring Kafka Streams using Spring Cloud Streams End to End example Endpoint http://localhost:8080/domain/lookup/facebook - to pull all facebook relate

Dec 20, 2022

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login example with Spring Security, MySQL and JWT Appropriate Flow for User Login and Registration with JWT Spring Boot Rest Api Architect

Jan 5, 2023

Best practice of monolithic spring application starter

Best practice of monolithic spring application starter

Best practice of monolithic spring application starter

Jul 19, 2022

A Spring Boot Camel boilerplate that aims to consume events from Apache Kafka, process it and send to a PostgreSQL database.

SPRING-BOOT CAMEL BOILERPLATE This is a Spring-Boot Camel Application model that you can use as a reference to study or even to use in your company. I

Apr 4, 2022

Spring Boot Debezium Kafka PostgreSQL Relationship

Spring Boot Debezium Kafka PostgreSQL Relationship

spring-boot-debezium-db-kafka Spring-Boot-Debezium-Kafka-PostgreSQL Relationship Installation First,Configure docker-compose.yml Second,Write Db-Kafka

Aug 26, 2022

Microservices with Spring Boot and Kafka Demo Project

Microservices with Spring Boot and Kafka Demo Project

Example microservices showing how to use Kafka and Kafka Streams with Spring Boot on the example of distributed transactions implementations with the SAGA pattern

Jan 7, 2023

LOQUI - Real-time chat application built using Apache Kafka, Java, Spring Boot, SockJS and React

LOQUI - Real-time chat application built using Apache Kafka, Java, Spring Boot, SockJS and React

LOQUI is a simple real-time chat application that demonstrates how to use Apache Kafka as a message broker along with Java, Spring Boot and React on the front-end

Jun 5, 2022
Releases(v.1.0.5)
Owner
liudong
liudong
A springboot-starter that can achieve Intranet penetration. 一款可以实现内网穿透的springboot-starter。

qynat-springboot-starter 基于netty的内网穿透工具在springboot中的整合 protocol协议:protobuf 只需在application.properties中配置少量信息,实现零代码侵入的web项目内网穿透 项目的server端的源码在另一个多模块项目中,

whz11 65 Dec 12, 2022
A springboot-starter that can achieve Intranet penetration. 一款可以实现内网穿透的springboot-starter。

qynat-springboot-starter 基于netty的内网穿透工具在springboot中的整合 protocol协议:protobuf 只需在application.properties中配置少量信息,实现零代码侵入的web项目内网穿透 项目的server端的源码在另一个多模块项目中,

whz11 65 Dec 12, 2022
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
Spring Boot starter module for gRPC framework.

Spring Boot starter module for gRPC framework.

Michael Zhang 2.8k Jan 4, 2023
Spring Boot starter module for gRPC framework.

Spring Boot starter module for gRPC framework.

Michael Zhang 1.8k Mar 17, 2021
Tuya 37 Dec 26, 2022
Spring Boot starter for JustAuth Plus.

Spring Boot starter for JustAuth Plus.

Fujie 5 Jun 23, 2022
基于 spring-boot-starter-log4j2:2.6.1 (log4j 2.14.1)

Log4j 2 CVE-2021-44228 测试样本应用 基于 spring-boot-starter-log4j2:2.6.1 (log4j 2.14.1) 可用接口 接口 请求方法 参数 vulnerable_request_get GET v=payload vulnerable_reque

Zhangzhe 3 Mar 23, 2022
An awesome Spring Boot Starter!

spring-boot-tony-starter An awesome Spring Boot Starter! Explore the docs » View Demo · Report Bug · Request Feature Table of Contents About The Proje

徐植君 11 Sep 13, 2022
Create your Java crypto trading bot in minutes. Our Spring boot starter takes care of exchange connections, accounts, orders, trades, and positions so you can focus on building your strategies.

Quick Start | Documentation | Discord | Twitter Create and run your java crypto trading bot in minutes Our Spring boot starter takes care of exchange

Cassandre 442 Jan 3, 2023