Skip to content

Commit a02373c

Browse files
committed
add project
1 parent 44fdd94 commit a02373c

35 files changed

+1778
-0
lines changed

model/pom.xml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>ru.on8off</groupId>
8+
<artifactId>spring-boot-kafka-streams-model</artifactId>
9+
<version>1.0.${revision}</version>
10+
<packaging>jar</packaging>
11+
12+
<properties>
13+
<revision>local</revision>
14+
<maven.compiler.source>16</maven.compiler.source>
15+
<maven.compiler.target>16</maven.compiler.target>
16+
<confluentinc.version>6.2.1</confluentinc.version>
17+
</properties>
18+
19+
<dependencies>
20+
<dependency>
21+
<groupId>org.projectlombok</groupId>
22+
<artifactId>lombok</artifactId>
23+
<version>1.18.22</version>
24+
<optional>true</optional>
25+
</dependency>
26+
<dependency>
27+
<groupId>io.confluent</groupId>
28+
<artifactId>kafka-schema-registry-client</artifactId>
29+
<version>${confluentinc.version}</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.apache.avro</groupId>
33+
<artifactId>avro</artifactId>
34+
<version>1.11.0</version>
35+
</dependency>
36+
<dependency>
37+
<groupId>io.confluent</groupId>
38+
<artifactId>kafka-avro-serializer</artifactId>
39+
<version>${confluentinc.version}</version>
40+
</dependency>
41+
<dependency>
42+
<groupId>io.confluent</groupId>
43+
<artifactId>kafka-streams-avro-serde</artifactId>
44+
<version>${confluentinc.version}</version>
45+
<exclusions>
46+
<exclusion>
47+
<groupId>org.slf4j</groupId>
48+
<artifactId>slf4j-log4j12</artifactId>
49+
</exclusion>
50+
</exclusions>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.fasterxml.jackson.datatype</groupId>
54+
<artifactId>jackson-datatype-jsr310</artifactId>
55+
<version>2.13.0</version>
56+
</dependency>
57+
58+
</dependencies>
59+
<repositories>
60+
<repository>
61+
<id>confluent</id>
62+
<url>https://packages.confluent.io/maven/</url>
63+
</repository>
64+
</repositories>
65+
<pluginRepositories>
66+
<pluginRepository>
67+
<id>confluent</id>
68+
<url>https://packages.confluent.io/maven/</url>
69+
</pluginRepository>
70+
</pluginRepositories>
71+
<build>
72+
<plugins>
73+
<plugin>
74+
<groupId>org.apache.avro</groupId>
75+
<artifactId>avro-maven-plugin</artifactId>
76+
<version>1.11.0</version>
77+
<executions>
78+
<execution>
79+
<phase>generate-sources</phase>
80+
<goals>
81+
<goal>schema</goal>
82+
</goals>
83+
<configuration>
84+
<sourceDirectory>src/main/avro</sourceDirectory>
85+
<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
86+
<stringType>String</stringType>
87+
</configuration>
88+
</execution>
89+
</executions>
90+
</plugin>
91+
</plugins>
92+
</build>
93+
94+
</project>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"namespace": "ru.on8off.kafka.streams.model.avro",
3+
"type": "record",
4+
"name": "PaymentEventAvro",
5+
"version": "1.1",
6+
"fields": [
7+
{"name": "timestamp", "type": "long"},
8+
{"name": "customerId", "type": "long"},
9+
{"name": "eventType", "type": {
10+
"type": "enum",
11+
"name": "EventTypeAvro",
12+
"symbols" : ["PaymentPageOpened", "PaymentTypeSelected", "PaymentDataFilled", "PaymentSucceed", "PaymentFailed"]
13+
}
14+
}
15+
]
16+
}
17+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package ru.on8off.kafka.streams.model;
2+
3+
import lombok.AllArgsConstructor;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
@Data
8+
@AllArgsConstructor
9+
@NoArgsConstructor
10+
public class Payment {
11+
private Long customerId;
12+
private Long paymentPageOpenedTime;
13+
private Long paymentTypeSelectedTime;
14+
private Long paymentDataFilledTime;
15+
private Long paymentSucceedTime;
16+
private Long paymentFailedTime;
17+
private Long updated;
18+
}

pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>ru.on8off</groupId>
8+
<artifactId>spring-boot-kafka-streams</artifactId>
9+
<version>1.0.${revision}</version>
10+
<packaging>pom</packaging>
11+
12+
<properties>
13+
<revision>local</revision>
14+
<maven.compiler.source>16</maven.compiler.source>
15+
<maven.compiler.target>16</maven.compiler.target>
16+
</properties>
17+
18+
<modules>
19+
<module>streams</module>
20+
<module>model</module>
21+
<module>producer</module>
22+
</modules>
23+
24+
</project>

0 commit comments

Comments
 (0)