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

[RRIO] [Task]: Add withErrorHandler to accept ErrorHandler.BadRecordErrorHandler #32418

Open
damondouglas opened this issue Sep 10, 2024 · 0 comments

Comments

@damondouglas
Copy link
Contributor

damondouglas commented Sep 10, 2024

What needs to happen?

A withErrorHandler method on RequestResponseIO accepts ErrorHandler.BadRecordErrorHandler and returns a PTransform<PCollection<RequestT>, PCollection<ResponseT>>.

The value of this new method is to enable chaining of API response PCollections to improve ease of use. For example,

try (BadRecordErrorHandler<T> errorHandler = pipeline.registerBadRecordErrorHandler(SomeDLQ.write())) {
    PCollection<ResponseT> results = records.apply(RequestResponseIO.of(...).withErrorHandler(errorHandler));
}

Issue Priority

Priority: 2 (default / most normal work should be filed as P2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant