This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 9d25859125d [Website] Add Asgarde, an error handling library, to the
3rd party Java extensions (#40268)
9d25859125d is described below
commit 9d25859125d9c3a27820f52c45252275090afdde
Author: Mazlum Tosun <[email protected]>
AuthorDate: Mon Sep 28 16:45:15 2026 +0200
[Website] Add Asgarde, an error handling library, to the 3rd party Java
extensions (#40268)
* [Website] Add Asgarde, an error handling library, to the 3rd party Java
extensions
* [Website] Mention the Beam ErrorHandler in the Asgarde entry
---
.../en/documentation/sdks/java-thirdparty.md | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/website/www/site/content/en/documentation/sdks/java-thirdparty.md
b/website/www/site/content/en/documentation/sdks/java-thirdparty.md
index 31fa2001a0c..34eee0ae776 100644
--- a/website/www/site/content/en/documentation/sdks/java-thirdparty.md
+++ b/website/www/site/content/en/documentation/sdks/java-thirdparty.md
@@ -109,3 +109,48 @@ Apache License 2.0
}
}));
+## Error handling and dead letter queues
+
+### Summary
+Asgarde simplifies error handling in the transformation steps of Beam
pipelines. The Beam
+[`ErrorHandler`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/transforms/errorhandling/ErrorHandler.html)
+aggregates bad records into a single dead letter queue, but each
transformation step still has to catch its own errors
+(a `try/catch` block and a `BadRecordRouter` in each `DoFn`, or
`exceptionsInto`/`exceptionsVia`). Asgarde keeps the
+fluent style of the `apply` chain: each step catches its errors as `Failure`
objects (step name, input element and
+exception), gathered for the whole flow.
+
+It accepts the Beam `MapElements` and `FlatMapElements`, and provides `DoFn`
classes with built-in error handling
+(`MapElementFn`, `FlatMapElementFn`, `FilterFn`...) supporting side inputs and
the `DoFn` lifecycle. It can also keep,
+in the failures, the element that entered the flow, to replay a failure from
the start, and counts the failures per
+step with Beam metrics. The Asgarde failures can be converted to `BadRecord`s
and added to an `ErrorHandler`, for a
+single dead letter queue together with the Beam IOs. Beam is a `provided`
dependency: the library isn't tied to a Beam
+version. Kotlin extensions are included, and a Python version is available on
PyPI
+([pasgarde](https://github.com/tosun-si/pasgarde)).
+
+### Project page
+[https://github.com/tosun-si/asgarde](https://github.com/tosun-si/asgarde)
+
+Documentation:
[https://tosun-si.github.io/asgarde/](https://tosun-si.github.io/asgarde/)
+
+### License
+MIT License
+
+### Download
+ <dependency>
+ <groupId>fr.groupbees</groupId>
+ <artifactId>asgarde</artifactId>
+ <version>1.4.0</version>
+ </dependency>
+
+### Code example
+ WithFailures.Result<PCollection<Integer>, Failure> result =
CollectionComposer.of(input)
+ .apply("Trim", MapElements.into(TypeDescriptors.strings()).via((String
value) -> value.trim()))
+ .apply("Parse",
MapElementFn.into(TypeDescriptors.integers()).via((String value) ->
Integer.parseInt(value)))
+ .apply("Keep even numbers", FilterFn.by(number -> number % 2 == 0))
+ .getResult();
+
+ PCollection<Integer> output = result.output();
+ PCollection<Failure> failures = result.failures(); // The failures of all
the steps
+
+ // Optional: a single dead letter queue with the Beam IOs using the
ErrorHandler.
+ errorHandler.addErrorCollection(failures.apply("To bad records",
FailureTransforms.toBadRecords()));