0

Is there a plan to support configuring a dead letter topic in a different cluster?

According to the below SO answer, the feature is not currently possible. Spring cloud Kafka Stream - Dead Letter Topic in Different Cluster

I search the github issues, and SO questions about the issue.

The following SO question is relevant. Spring cloud Kafka Stream - Dead Letter Topic in Different Cluster

1 Answers1

0

That answer is nearly 2 years old.

You can use a ListenerContainerCustomizer bean to configure a DefaultErrorHandler with a DeadLetterPublishingRecoverer which is configured with a KafkaTemplate to send the record to a different cluster.

Disable retries/DLT in the binder and configure the error handler with the desired retry characteristics.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • Thank you for the quick response! I found that the below two reference sections are also helpful! * [handling deserialization errors with dlq](https://docs.spring.io/spring-cloud-stream/docs/current/reference/html/spring-cloud-stream-binder-kafka.html#_handling_deserialization_errors_with_dlq) * [Publishing Dead-letter Records](https://docs.spring.io/spring-kafka/docs/current/reference/html/#dead-letters) – Byungjun You Jan 10 '23 at 15:52