Merge der Upgrades für Confluent/Spring-Boot (Branch 'first-contact')
authorKai Moritz <kai@juplo.de>
Fri, 22 Jul 2022 18:19:56 +0000 (20:19 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 22 Jul 2022 18:22:26 +0000 (20:22 +0200)
1  2 
docker-compose.yml
pom.xml

diff --combined docker-compose.yml
@@@ -1,14 -1,14 +1,14 @@@
  version: '3.2'
  services:
    zookeeper:
-     image: confluentinc/cp-zookeeper:7.0.2
+     image: confluentinc/cp-zookeeper:7.1.3
      environment:
        ZOOKEEPER_CLIENT_PORT: 2181
      ports:
        - 2181:2181
  
    kafka:
-     image: confluentinc/cp-kafka:7.0.2
+     image: confluentinc/cp-kafka:7.1.3
      environment:
        KAFKA_BROKER_ID: 1
        KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
    cli:
      image: juplo/toolbox
      command: sleep infinity
 +
 +  producer:
 +    image: juplo/endless-producer:1.0-SNAPSHOT
 +    ports:
 +      - 8080:8880
 +    environment:
 +      producer.bootstrap-server: kafka:9092
 +      producer.client-id: producer
 +      producer.topic: test
 +      producer.throttle-ms: 200
diff --combined pom.xml
+++ b/pom.xml
@@@ -7,29 -7,16 +7,29 @@@
    <parent>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
-     <version>2.6.5</version>
+     <version>2.7.2</version>
      <relativePath/> <!-- lookup parent from repository -->
    </parent>
  
    <groupId>de.juplo.kafka</groupId>
 -  <artifactId>first-contact</artifactId>
 -  <name>First Contact: a Simple Producer and a simple Consumer-Group</name>
 +  <artifactId>endless-producer</artifactId>
 +  <name>Endless Producer: a Simple Producer that endlessly writes numbers into a topic</name>
    <version>1.0-SNAPSHOT</version>
  
    <dependencies>
 +    <dependency>
 +      <groupId>org.springframework.boot</groupId>
 +      <artifactId>spring-boot-starter-web</artifactId>
 +    </dependency>
 +    <dependency>
 +      <groupId>org.springframework.boot</groupId>
 +      <artifactId>spring-boot-starter-actuator</artifactId>
 +    </dependency>
 +    <dependency>
 +      <groupId>org.springframework.boot</groupId>
 +      <artifactId>spring-boot-configuration-processor</artifactId>
 +      <optional>true</optional>
 +    </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-clients</artifactId>
        <artifactId>lombok</artifactId>
      </dependency>
      <dependency>
 -      <groupId>ch.qos.logback</groupId>
 -      <artifactId>logback-classic</artifactId>
 +      <groupId>org.springframework.boot</groupId>
 +      <artifactId>spring-boot-starter-test</artifactId>
 +      <scope>test</scope>
      </dependency>
    </dependencies>
  
    <build>
      <plugins>
        <plugin>
 -        <groupId>org.codehaus.mojo</groupId>
 -        <artifactId>exec-maven-plugin</artifactId>
 -        <version>3.0.0</version>
 +        <groupId>org.springframework.boot</groupId>
 +        <artifactId>spring-boot-maven-plugin</artifactId>
          <executions>
            <execution>
 -            <id>producer</id>
 -            <configuration>
 -              <mainClass>de.juplo.kafka.SimpleProducer</mainClass>
 -            </configuration>
 +            <goals>
 +              <goal>build-info</goal>
 +            </goals>
            </execution>
 +        </executions>
 +      </plugin>
 +      <plugin>
 +        <groupId>pl.project13.maven</groupId>
 +        <artifactId>git-commit-id-plugin</artifactId>
 +      </plugin>
 +      <plugin>
 +        <groupId>io.fabric8</groupId>
 +        <artifactId>docker-maven-plugin</artifactId>
 +        <version>0.33.0</version>
 +        <configuration>
 +          <images>
 +            <image>
 +              <name>juplo/%a:%v</name>
 +            </image>
 +          </images>
 +        </configuration>
 +        <executions>
            <execution>
 -            <id>consumer</id>
 -            <configuration>
 -              <mainClass>de.juplo.kafka.SimpleConsumer</mainClass>
 -            </configuration>
 +             <id>build</id>
 +             <phase>package</phase>
 +             <goals>
 +               <goal>build</goal>
 +             </goals>
            </execution>
          </executions>
        </plugin>