-
Notifications
You must be signed in to change notification settings - Fork 879
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use kafka transactions to make spring-kafka tests more stable (#4024)
* Use kafka transactions to make spring-kafka tests more stable * manual acks * another approach: batch error handler that immediately recovers * another try * yet another try * do nothing error handler * spotless
- Loading branch information
Mateusz Rzeszutek
authored
Aug 30, 2021
1 parent
0f9308b
commit 01ea967
Showing
2 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...ation/spring/spring-kafka-2.7/javaagent/src/test/groovy/DoNothingBatchErrorHandler.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import org.apache.kafka.clients.consumer.ConsumerRecords | ||
import org.springframework.kafka.listener.BatchErrorHandler | ||
|
||
class DoNothingBatchErrorHandler implements BatchErrorHandler { | ||
@Override | ||
void handle(Exception thrownException, ConsumerRecords<?, ?> data) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters