spring-cloud / spring-cloud-stream-binder-kafka

Spring Cloud Stream binders for Apache Kafka and Kafka Streams
Apache License 2.0
331 stars 301 forks source link

Enable DLQ with destinations as pattern #1226

Open acoboh opened 1 year ago

acoboh commented 1 year ago

Hi, I'm using the dependency

<dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-stream-binder-kafka</artifactId>
        <version>3.2.6</version>
</dependency>

I require the use of the destination-is-prefix feature for my consumers, but I've noticed that it disables the DLQs.

During my code inspection, I discovered that the checks for enable-dlq and destination-is-prefix should also include the dlq-name property. If the user specifies dlq-name, destination-is-prefix should operate correctly. In case it's so, this change would be very helpful to me as it would save me the effort of managing DLQs manually.

Please let me know if I'm mistaken.