mjsax commented on code in PR #16433:
URL: https://github.com/apache/kafka/pull/16433#discussion_r1693449190
##########
streams/src/main/java/org/apache/kafka/streams/errors/ProductionExceptionHandler.java:
##########
@@ -30,22 +30,60 @@ public interface ProductionExceptionHandler extends
Configurable {
*
* @param record The record that failed to produce
* @param exception The exception that occurred during production
+ * @deprecated Use {@link #handle(ErrorHandlerContext, ProducerRecord,
Exception)} instead
*/
- ProductionExceptionHandlerResponse handle(final ProducerRecord<byte[],
byte[]> record,
- final Exception exception);
+ @Deprecated
+ default ProductionExceptionHandlerResponse handle(final
ProducerRecord<byte[], byte[]> record,
+ final Exception
exception) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Inspect a record that we attempted to produce, and the exception that
resulted
+ * from attempting to produce it and determine whether or not to continue
processing.
+ *
+ * @param context The error handler context metadata
+ * @param record The record that failed to produce
+ * @param exception The exception that occurred during production
+ */
+ @SuppressWarnings("deprecation")
+ default ProductionExceptionHandlerResponse handle(final
ErrorHandlerContext context,
+ final
ProducerRecord<byte[], byte[]> record,
+ final Exception
exception) {
+ return handle(record, exception);
+ }
/**
* Handles serialization exception and determine if the process should
continue. The default implementation is to
* fail the process.
*
* @param record the record that failed to serialize
* @param exception the exception that occurred during serialization
+ * @deprecated Use {@link #handle(ErrorHandlerContext, ProducerRecord,
Exception)} instead
Review Comment:
```suggestion
* @deprecated Since 3.9. Use {@link #handle(ErrorHandlerContext,
ProducerRecord, Exception)} instead.
```
--
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]