Skip to content

Commit

Permalink
Update AvroDeadLetterConverter example from deprecated transformer st…
Browse files Browse the repository at this point in the history
…yle to processor style (#22)
  • Loading branch information
JakobEdding authored Jan 3, 2024
1 parent 4b8507c commit 346a002
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ final KStream<Integer, String> input =
final KStream<Double, ProcessedKeyValue<Integer, String, Long>> mappedWithErrors =
input.map(captureErrors(mapper));
mappedWithErrors.flatMap(ProcessedKeyValue::getErrors)
.transformValues(AvroDeadLetterConverter.asTransformer("A good description where the pipeline broke"))
.processValues(AvroDeadLetterConverter.asProcessor("A good description where the pipeline broke"))
.to(ERROR_TOPIC);

final KStream<Double, Long> mapped = mappedWithErrors.flatMapValues(ProcessedKeyValue::getValues);
Expand All @@ -90,7 +90,7 @@ This error topic contains dead letters describing the input value, error message

The example uses the `AvroDeadLetterConverter` from `error-handling-avro`.
Analogously, `error-handling-proto` implements a `ProtoDeadLetterConverter`.
A custom `DeadLetterConverter` can be passed to `DeadLetterTransformer.create`.
A custom `DeadLetterConverter` can be passed to `DeadLetterProcessor.create`.

## Development

Expand Down

0 comments on commit 346a002

Please sign in to comment.