-
Notifications
You must be signed in to change notification settings - Fork 2
/
pom.xml
181 lines (181 loc) · 7.49 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?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>
<groupId>io.confluent</groupId>
<artifactId>demo-data-contracts</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<licenses>
<license>
<name>Apache License 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<repositories>
<repository>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</pluginRepository>
</pluginRepositories>
<properties>
<confluent.version>7.4.2-0</confluent.version>
<kafka.version>3.4.0</kafka.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<avro.version>1.11.1</avro.version>
<schema.registry.url>http://localhost:8081</schema.registry.url>
<schema.registry.basic.auth.user.info></schema.registry.basic.auth.user.info>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>${confluent.version}</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-rules</artifactId>
<version>${confluent.version}</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-serializer</artifactId>
<version>${confluent.version}</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client</artifactId>
<version>${confluent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>${avro.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-mail</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>com.github.javafaker</groupId>
<artifactId>javafaker</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<version>2.0.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/avro</sourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-maven-plugin</artifactId>
<version>${confluent.version}</version>
<configuration>
<schemaRegistryUrls>
<param>${schema.registry.url}</param>
</schemaRegistryUrls>
<userInfoConfig>${schema.registry.basic.auth.user.info}</userInfoConfig>
<subjects>
<orders-value>src/main/avro/order.avsc</orders-value>
</subjects>
<schemaTypes>
<orders-value>AVRO</orders-value>
</schemaTypes>
<metadata>
<orders-value>
<properties>
<owner>Bob Jones</owner>
<owner_email>rayokota@gmail.com</owner_email>
<slo_timeliness_secs>10</slo_timeliness_secs>
</properties>
</orders-value>
</metadata>
<ruleSet>
<orders-value>
<domainRules>
<rule>
<name>checkTotalPrice</name>
<doc>Check total price</doc>
<kind>CONDITION</kind>
<type>CEL</type>
<mode>WRITE</mode>
<expr>message.totalPriceCents > 0</expr>
<params>
<dlq.topic>bad_orders</dlq.topic>
</params>
<onFailure>DLQ</onFailure>
<disabled>false</disabled>
</rule>
<rule>
<name>checkSloTimeliness</name>
<doc>Check SLO timeliness</doc>
<kind>CONDITION</kind>
<type>CEL</type>
<mode>READ</mode>
<expr>true</expr>
<params>
<mail.smtp.host>smtp.gmail.com</mail.smtp.host>
<mail.smtp.port>587</mail.smtp.port>
<mail.smtp.from>rayokota@gmail.com</mail.smtp.from>
</params>
<onSuccess>EMAIL</onSuccess>
<disabled>false</disabled>
</rule>
</domainRules>
</orders-value>
</ruleSet>
<compatibilityLevels/>
<messagePath/>
<outputDirectory/>
<outputPath/>
<previousSchemaPaths/>
<schemas/>
</configuration>
<goals>
<goal>register</goal>
</goals>
</plugin>
</plugins>
</build>
</project>