[JAVA-33623] Split-or-move-spring-kafka-module (#16419)
This commit is contained in:
parent
c5f26cf59a
commit
88e3dee91a
2
pom.xml
2
pom.xml
|
@ -812,6 +812,7 @@
|
|||
<!--<module>spring-jinq</module>-->
|
||||
<module>spring-kafka-2</module>
|
||||
<module>spring-kafka-3</module>
|
||||
<module>spring-kafka-4</module>
|
||||
<module>spring-kafka</module>
|
||||
<module>spring-katharsis</module> <!-- Upgrade to Boot 3 not possible as the project has not been upgraded to Support Jakarta dependencies-->
|
||||
<module>spring-mobile</module>
|
||||
|
@ -1059,6 +1060,7 @@
|
|||
<!--<module>spring-jinq</module>-->
|
||||
<module>spring-kafka-2</module>
|
||||
<module>spring-kafka-3</module>
|
||||
<module>spring-kafka-4</module>
|
||||
<module>spring-kafka</module>
|
||||
<module>spring-katharsis</module> <!-- Upgrade to Boot 3 not possible as the project has not been upgraded to Support Jakarta dependencies-->
|
||||
<module>spring-mobile</module>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
## Spring Kafka
|
||||
|
||||
This module contains articles about Spring with Kafka
|
||||
|
||||
### Relevant articles
|
||||
|
||||
- [Get the Number of Messages in an Apache Kafka Topic](https://www.baeldung.com/java-kafka-count-topic-messages)
|
||||
- [Sending Data to a Specific Partition in Kafka](https://www.baeldung.com/kafka-send-data-partition)
|
||||
|
||||
- More articles: [[<-- prev]](../spring-kafka-3)
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>spring-kafka-4</artifactId>
|
||||
<name>spring-kafka-4</name>
|
||||
<description>Intro to Kafka with Spring</description>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-boot-3</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-3</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.kafka</groupId>
|
||||
<artifactId>spring-kafka</artifactId>
|
||||
<version>${spring-kafka.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.kafka</groupId>
|
||||
<artifactId>spring-kafka-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>kafka</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>com.baeldung.spring.kafka.KafkaApplication</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<spring-kafka.version>3.1.2</spring-kafka.version>
|
||||
<spring-boot.version>3.2.2</spring-boot.version>
|
||||
<junit-jupiter.version>5.10.2</junit-jupiter.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,2 @@
|
|||
server.port=8081
|
||||
spring.kafka.bootstrap-servers=localhost:9092
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
||||
</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</configuration>
|
|
@ -0,0 +1,7 @@
|
|||
spring:
|
||||
kafka:
|
||||
consumer:
|
||||
auto-offset-reset: earliest
|
||||
group-id: baeldung
|
||||
test:
|
||||
topic: embedded-test-topic
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
||||
</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
|
||||
<!-- Reduce the noise as the consumer keeps trying to connect until the Kafka instance is available -->
|
||||
<springProfile name="ssl">
|
||||
<logger name="org.apache.kafka.clients.NetworkClient" level="ERROR" additivity="false"/>
|
||||
</springProfile>
|
||||
|
||||
</configuration>
|
|
@ -9,8 +9,6 @@ This module contains articles about Spring with Kafka
|
|||
- [Monitor the Consumer Lag in Apache Kafka](https://www.baeldung.com/java-kafka-consumer-lag)
|
||||
- [Send Large Messages With Kafka](https://www.baeldung.com/java-kafka-send-large-message)
|
||||
- [Kafka Streams With Spring Boot](https://www.baeldung.com/spring-boot-kafka-streams)
|
||||
- [Get the Number of Messages in an Apache Kafka Topic](https://www.baeldung.com/java-kafka-count-topic-messages)
|
||||
- [Sending Data to a Specific Partition in Kafka](https://www.baeldung.com/kafka-send-data-partition)
|
||||
- [Implementing Retry in Kafka Consumer](https://www.baeldung.com/spring-retry-kafka-consumer)
|
||||
### Intro
|
||||
|
||||
|
|
Loading…
Reference in New Issue