mjsax commented on code in PR #16675:
URL: https://github.com/apache/kafka/pull/16675#discussion_r1696289377
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorNode.java:
##########
@@ -214,9 +214,13 @@ public void process(final Record<KIn, VIn> record) {
internalProcessorContext.currentNode().name(),
internalProcessorContext.taskId());
- final ProcessingExceptionHandler.ProcessingHandlerResponse
response = processingExceptionHandler
- .handle(errorHandlerContext, record, e);
+ final ProcessingExceptionHandler.ProcessingHandlerResponse
response;
+ try {
+ response =
processingExceptionHandler.handle(errorHandlerContext, record, e);
+ } catch (final Exception fatalUserException) {
+ throw new StreamsException("Fatal user code error in
processing error callback", fatalUserException);
Review Comment:
One more thing: if we throw `StreamsException` here, we might catch it in an
upstream `process()`, right? So should we rather wrap this `StreamsException`
with a `FailedProcessingException`?
Do we actually have a test for "passing through" of
`FailedProcessingException` (ie, a test which checks if upstream
`ProcessingExceptionHandler` are not called any longer, if a downstream
processor had an error and the corresponding handler did return `FAIL`? If yes,
we could re-use this test to also test a crashing handler. If not, let's add
new tests for both cases :)
--
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]