I use Spring-Kafka 2.7.7 with @RetryableTopic to re-process messages from my two topics, MyTopic1 and MyTopic2, after some time
@RetryableTopic( attempts ="3", backoff = @Backoff(delay=1000), autoCreateTopics = "false"))@KafkaListener(topics = "myTopic1",public void processMessage(MyPojo1 message) { // ... message processing}@RetryableTopic(attempts ="3", backoff = @Backoff(delay=1000), autoCreateTopics = "false"))@KafkaListener(topics = "myTopic2")public void processMessage(MyPojo2 message) { // ... message processing}@DltHandlerpublic void DltHandler1(MyPojo1 message) { // ... message processing}@DltHandlerpublic void DltHandler1(MyPojo2 message) { // ... message processing}
I have Retry-Mytopic1-0, Retry-Mytopic1-1, Retry-Mytopic1-2, MyTopic1-DLT and Topic for MyTopic2But I have two problems
After writing a message to the Topik Retry-Mytopic1-0, I get amessage:
Seek to Current AFTER Exception; NESSTED Exception isorg.springframework.kafka.listenerexecitationfailedException:Listener Failed; NESSTED Exception isorg.springframework.kafka.listener.kafkabackoffexception: Partition0 from Topic Retry-Mytopic1-0 is not Ready for Consumption, Backing OFFFor Approx. 990 Millis.
And that's right, the consumer saw that the processing time did notoccur But in the future, processing does not occur, on thisinformation message everything ends
How can I configure @dlthandler for each DLT-Topic? After all, theyget different DTO in the input