RetryTopicConfigurationSupport to allow customizing log behavior
Current Behavior
DeadLetterPublishingRecovererFactory.maybeLogListenerException is private and can't be customized
Context
I want to log only certain type of exceptions controlled by the services of the application. If the exception class is not our business exception, I'd like to log high-level info only with no details and the stack trace
The matter is some exceptions can contain PHII which is not allowed to be logged. For instance, we use Confluent Kafka, and when it fails to deserialize, it adds the message payload in the exception
As a workaround I tried to override DestinationTopicResolver, RetryTopicComponentFactory or log in the PartitionResolver. All the options have drawbacks such as limited input, or called more then once, or require massive factory customization
Expected Behavior
RetryTopicConfigurationSupport
to allow customizing log behaviorCurrent Behavior
DeadLetterPublishingRecovererFactory.maybeLogListenerException
is private and can't be customizedContext
I want to log only certain type of exceptions controlled by the services of the application. If the exception class is not our business exception, I'd like to log high-level info only with no details and the stack trace The matter is some exceptions can contain PHII which is not allowed to be logged. For instance, we use Confluent Kafka, and when it fails to deserialize, it adds the message payload in the exception As a workaround I tried to override
DestinationTopicResolver
,RetryTopicComponentFactory
or log in the PartitionResolver. All the options have drawbacks such as limited input, or called more then once, or require massive factory customization