Rajarshi-Misra commented on code in PR #21606:
URL: https://github.com/apache/kafka/pull/21606#discussion_r2936348820
##########
docs/streams/developer-guide/config-streams.md:
##########
@@ -1485,6 +1485,57 @@ Serde for the inner class of a windowed record. Must
implement the `Serde` inter
> }
> }
+>**Note: The example above demonstrates manual production to a DLQ topic. The
following example shows the recommended approach using the built-in DLQ
support.**
+> A custom processing exception handler can decide whether to continue or fail
processing when user logic throws an exception. If DLQ behavior is required,
return DLQ records from the handler response.
+>
+> **Custom Exception Handler Implementation**
+>
+> The following example forwards failed records to a configured DLQ topic:
+>
+> ```java
+> public class DlqProcessingExceptionHandler implements
ProcessingExceptionHandler {
+>
+> private String deadLetterQueueTopic;
+>
+> @Override
+> public Response handleError(final ErrorHandlerContext context,
+> final Record<?, ?> record,
+> final Exception exception) {
+>
+> return Response.resume(
+> ExceptionHandlerUtils.maybeBuildDeadLetterQueueRecords(
Review Comment:
I have removed the dependency on `ExceptionHandlerUtils` and replaced with
a record construction
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]