Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AvroDeadLetterConverter example from deprecated transformer style to processor style #22

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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