From 4dddd33f8960a616db737c05e855b38486aaa225 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Tue, 12 Nov 2024 14:38:13 +0100 Subject: [PATCH] Add withErrorHandler docs --- .../java/org/apache/beam/sdk/io/solace/SolaceIO.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/SolaceIO.java b/sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/SolaceIO.java index 0ec1a6c94be..a55d8a0a421 100644 --- a/sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/SolaceIO.java +++ b/sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/SolaceIO.java @@ -969,7 +969,7 @@ public Write withSubmissionMode(SubmissionMode submissionMode) { *

The Solace writer can either use the JCSMP modes in streaming or batched. * *

In streaming mode, the publishing latency will be lower, but the throughput will also be - * lower. todo validate the constant sec + * lower. * *

With the batched mode, messages are accumulated until a batch size of 50 is reached, or * {@link UnboundedBatchedSolaceWriter#ACKS_FLUSHING_INTERVAL_SECS} seconds have elapsed since @@ -999,7 +999,15 @@ public Write withSessionServiceFactory(SessionServiceFactory factory) { return toBuilder().setSessionServiceFactory(factory).build(); } - /** todo docs */ + /** + * An optional error handler for handling records that failed to publish to Solace. + * + *

If provided, this error handler will be invoked for each record that could not be + * successfully published. The error handler can implement custom logic for dealing with failed + * records, such as writing them to a dead-letter queue or logging them. + * + *

If no error handler is provided, failed records will be ignored. + */ public Write withErrorHandler(ErrorHandler errorHandler) { return toBuilder().setErrorHandler(errorHandler).build(); }