mjsax commented on code in PR #17005:
URL: https://github.com/apache/kafka/pull/17005#discussion_r1735364225
##########
streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java:
##########
@@ -1910,11 +1938,45 @@ public TimestampExtractor defaultTimestampExtractor() {
return getConfiguredInstance(DEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIG,
TimestampExtractor.class);
}
+ public DeserializationExceptionHandler deserializationExceptionHandler() {
+ if
(originals().containsKey(DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG) &&
+
originals().containsKey(DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG))
{
+ log.warn("Both the deprecated and new config for deserialization
exception handler are configured. " +
+ "The deprecated one will be ignored.");
+ }
+ if
(originals().containsKey(DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG)) {
+ return
getConfiguredInstance(DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG,
DeserializationExceptionHandler.class);
+ } else {
+ return defaultDeserializationExceptionHandler();
+ }
+ }
+
+ /**
+ * @deprecated as of kafka 4.0; use {@link
#deserializationExceptionHandler()} instead
+ */
+ @Deprecated
@SuppressWarnings("WeakerAccess")
public DeserializationExceptionHandler
defaultDeserializationExceptionHandler() {
return
getConfiguredInstance(DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG,
DeserializationExceptionHandler.class);
}
+ public ProductionExceptionHandler productionExceptionHandler() {
+ if (originals().containsKey(PRODUCTION_EXCEPTION_HANDLER_CLASS_CONFIG)
&&
+
originals().containsKey(DEFAULT_PRODUCTION_EXCEPTION_HANDLER_CLASS_CONFIG)) {
+ log.warn("Both the deprecated and new config for production
exception handler are configured. " +
+ "The deprecated one will be ignored.");
+ }
+ if
(originals().containsKey(PRODUCTION_EXCEPTION_HANDLER_CLASS_CONFIG)) {
+ return
getConfiguredInstance(PRODUCTION_EXCEPTION_HANDLER_CLASS_CONFIG,
ProductionExceptionHandler.class);
+ } else {
+ return defaultProductionExceptionHandler();
+ }
+ }
+
+ /**
+ * @deprecated as of kafka 4.0; use {@link #processingExceptionHandler()}
instead
Review Comment:
```suggestion
* @deprecated since 4.0; use {@link #processingExceptionHandler()}
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]