File tree Expand file tree Collapse file tree 4 files changed +19
-17
lines changed
main/java/com/michelin/kafka/error/handling/papi
test/java/com/michelin/kafka/error/handling/papi Expand file tree Collapse file tree 4 files changed +19
-17
lines changed Original file line number Diff line number Diff line change 8
8
[ ![ Kafka Version] ( https://img.shields.io/badge/dynamic/xml?url=https%3A%2F%2Fraw.githubusercontent.com%michelin%2Fprocessing-error-handling%2Fmain%2Fpom.xml&query=%2F*%5Blocal-name()%3D'project'%5D%2F*%5Blocal-name()%3D'properties'%5D%2F*%5Blocal-name()%3D'kafka-streams.version'%5D%2Ftext()&style=for-the-badge&logo=apachekafka&label=version )] ( https://github.com/michelin/processing-error-handling/blob/main/pom.xml )
9
9
[ ![ License] ( https://img.shields.io/badge/License-Apache%202.0-blue.svg?logo=apache&style=for-the-badge )] ( https://opensource.org/licenses/Apache-2.0 )
10
10
11
- [ Prerequisites] ( #Prerequisites ) • [ Examples] ( #examples )
11
+ [ Prerequisites] ( #prerequisites ) • [ Examples] ( #examples )
12
12
13
13
Code sample for [ KIP-1033] ( https://cwiki.apache.org/confluence/display/KAFKA/KIP-1033%3A+Add+Kafka+Streams+exception+handler+for+exceptions+occurring+during+processing ) .
14
14
Original file line number Diff line number Diff line change 14
14
15
15
<properties >
16
16
<gson .version>2.10.1</gson .version>
17
+ <jib-maven-plugin .version>3.4.5</jib-maven-plugin .version>
17
18
<junit-jupiter .version>5.12.1</junit-jupiter .version>
18
19
<kafka-streams .version>4.0.0</kafka-streams .version>
19
20
<logback .version>1.5.18</logback .version>
20
21
<maven .compiler.source>21</maven .compiler.source>
21
22
<maven .compiler.target>21</maven .compiler.target>
22
23
<palantir .version>2.58.0</palantir .version>
23
- <jib-maven-plugin .version>3.4.5</jib-maven-plugin .version>
24
24
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
25
25
<slf4j-api .version>2.0.17</slf4j-api .version>
26
26
<spotless-maven-plugin .version>2.44.3</spotless-maven-plugin .version>
75
75
<build >
76
76
<finalName >${project.artifactId} </finalName >
77
77
<plugins >
78
- <plugin >
79
- <groupId >com.google.cloud.tools</groupId >
80
- <artifactId >jib-maven-plugin</artifactId >
81
- <version >${jib-maven-plugin.version} </version >
82
- <configuration >
83
- <from >
84
- <image >eclipse-temurin:21-jre-alpine</image >
85
- </from >
86
- <to >
87
- <image >docker.io/michelin/kafka-streams-processing-error-handling:${project.artifactId} -${project.version} </image >
88
- </to >
89
- </configuration >
90
- </plugin >
91
78
92
79
<plugin >
93
80
<groupId >com.diffplug.spotless</groupId >
139
126
</execution >
140
127
</executions >
141
128
</plugin >
129
+ <plugin >
130
+ <groupId >com.google.cloud.tools</groupId >
131
+ <artifactId >jib-maven-plugin</artifactId >
132
+ <version >${jib-maven-plugin.version} </version >
133
+ <configuration >
134
+ <from >
135
+ <image >eclipse-temurin:21-jre-alpine</image >
136
+ </from >
137
+ <to >
138
+ <image >docker.io/michelin/kafka-streams-processing-error-handling:${project.artifactId} -${project.version} </image >
139
+ </to >
140
+ </configuration >
141
+ </plugin >
142
142
</plugins >
143
143
</build >
144
144
</project >
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ public void configure(Map<String, ?> map) {
50
50
}
51
51
52
52
private boolean isContinuableException (Exception exception ) {
53
- return exception instanceof JsonSyntaxException || exception instanceof NullPointerException || exception instanceof KaboomException ;
53
+ return exception instanceof JsonSyntaxException
54
+ || exception instanceof NullPointerException
55
+ || exception instanceof KaboomException ;
54
56
}
55
57
}
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ void shouldHandleExceptionsAndContinueProcessing() {
123
123
124
124
assertEquals (3.0 , testDriver .metrics ().get (droppedRecordsTotalMetric ()).metricValue ());
125
125
assertEquals (
126
- 0.03333333333333333 ,
126
+ 0.03333333333333333 ,
127
127
testDriver .metrics ().get (droppedRecordsRateMetric ()).metricValue ());
128
128
}
129
129
You can’t perform that action at this time.
0 commit comments