Is there a way to specify the dlt used when retrying with spring-kafka @RetryableTopic.
I use a listener with the following configuration :
@RetryableTopic(
attempts = "4",
backoff = @Backoff(delay = 1000),
autoCreateTopics = "false",
topicSuffixingStrategy = TopicSuffixingStrategy.SUFFIX_WITH_DELAY_VALUE,
fixedDelayTopicStrategy = FixedDelayStrategy.SINGLE_TOPIC)
@KafkaListener(topics = "${spring.kafka.template.default-topic}")
This retries using a single topic but uses my main topic +”_dlt” for exhausted retries even though I have a dead letter topic with a different name configured at :
spring:
kafka:
consumer:
template:
dead-letter-topic: its_dead_jim
I’ve used a DeadLetterPublishingRecoverer in the past and have implemented the dlt resolver function but I don’t see a way to override the default behavior in the documentation for RetryableTopic. I’ve looked at RetryTopicConfigurationBuilder and RetryTopicConfigurer
but nothing seem applicable to change the DLT name.