Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7ccf543

Browse files
committedMar 31, 2025··
Spotless
1 parent 4e3f77e commit 7ccf543

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed
 

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![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)
99
[![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)
1010

11-
[Prerequisites](#Prerequisites)[Examples](#examples)
11+
[Prerequisites](#prerequisites)[Examples](#examples)
1212

1313
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).
1414

‎pom.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
<properties>
1616
<gson.version>2.10.1</gson.version>
17+
<jib-maven-plugin.version>3.4.5</jib-maven-plugin.version>
1718
<junit-jupiter.version>5.12.1</junit-jupiter.version>
1819
<kafka-streams.version>4.0.0</kafka-streams.version>
1920
<logback.version>1.5.18</logback.version>
2021
<maven.compiler.source>21</maven.compiler.source>
2122
<maven.compiler.target>21</maven.compiler.target>
2223
<palantir.version>2.58.0</palantir.version>
23-
<jib-maven-plugin.version>3.4.5</jib-maven-plugin.version>
2424
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2525
<slf4j-api.version>2.0.17</slf4j-api.version>
2626
<spotless-maven-plugin.version>2.44.3</spotless-maven-plugin.version>
@@ -75,19 +75,6 @@
7575
<build>
7676
<finalName>${project.artifactId}</finalName>
7777
<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>
9178

9279
<plugin>
9380
<groupId>com.diffplug.spotless</groupId>
@@ -139,6 +126,19 @@
139126
</execution>
140127
</executions>
141128
</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>
142142
</plugins>
143143
</build>
144144
</project>

‎processor-api/src/main/java/com/michelin/kafka/error/handling/papi/CustomProcessingExceptionHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public void configure(Map<String, ?> map) {
5050
}
5151

5252
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;
5456
}
5557
}

‎processor-api/src/test/java/com/michelin/kafka/error/handling/papi/KafkaStreamsAppTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void shouldHandleExceptionsAndContinueProcessing() {
123123

124124
assertEquals(3.0, testDriver.metrics().get(droppedRecordsTotalMetric()).metricValue());
125125
assertEquals(
126-
0.03333333333333333,
126+
0.03333333333333333,
127127
testDriver.metrics().get(droppedRecordsRateMetric()).metricValue());
128128
}
129129

0 commit comments

Comments
 (0)
Please sign in to comment.