diff --git a/kafka-streams-samples/kafka-streams-dlq-sample/README.adoc b/kafka-streams-samples/kafka-streams-dlq-sample/README.adoc
index ba6b06a..71fb6de 100644
--- a/kafka-streams-samples/kafka-streams-dlq-sample/README.adoc
+++ b/kafka-streams-samples/kafka-streams-dlq-sample/README.adoc
@@ -36,6 +36,5 @@ On the console producer, enter some text data.
You will see that the messages produce deserialization errors and end up in the DLQ topic - words-count-dlq.
You will not see any messages coming to the regular destination counts.
-There is another yaml file provided (by-framework-decoding.yml).
-Use that as application.yml to see how it works when the deserialization done by the framework.
-In this case also, the messages on error appear in the DLQ topic.
+In the application's configuration we set the value `Serde` as `Integer` and this is the reason why deserialization errors occur.
+The application expects numerical data, but the producer sends regular text.
diff --git a/kafka-streams-samples/kafka-streams-dlq-sample/pom.xml b/kafka-streams-samples/kafka-streams-dlq-sample/pom.xml
index 75e1641..904ac42 100644
--- a/kafka-streams-samples/kafka-streams-dlq-sample/pom.xml
+++ b/kafka-streams-samples/kafka-streams-dlq-sample/pom.xml
@@ -11,23 +11,62 @@
Demo project for Spring Boot
- io.spring.cloud.stream.sample
- spring-cloud-stream-samples-parent
- 0.0.1-SNAPSHOT
- ../..
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.2.0.RELEASE
+
+
+ Hoxton.BUILD-SNAPSHOT
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ ${spring-cloud.version}
+ pom
+ import
+
+
+
+
org.springframework.cloud
spring-cloud-stream-binder-kafka-streams
-
org.springframework.boot
spring-boot-starter-test
test
+
+ org.springframework.kafka
+ spring-kafka-test
+ test
+
+
+ org.apache.kafka
+ kafka-streams-test-utils
+ ${kafka.version}
+ test
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
@@ -39,4 +78,55 @@
+
+
+ spring-snapshots
+ Spring Snapshots
+ https://repo.spring.io/libs-snapshot-local
+
+ true
+
+
+ false
+
+
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/libs-milestone-local
+
+ false
+
+
+
+
+
+ spring-snapshots
+ Spring Snapshots
+ https://repo.spring.io/libs-snapshot-local
+
+ true
+
+
+ false
+
+
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/libs-milestone-local
+
+ false
+
+
+
+ spring-releases
+ Spring Releases
+ https://repo.spring.io/libs-release-local
+
+ false
+
+
+
+
diff --git a/kafka-streams-samples/kafka-streams-dlq-sample/src/main/java/kafka/streams/dlq/sample/KafkaStreamsDlqSample.java b/kafka-streams-samples/kafka-streams-dlq-sample/src/main/java/kafka/streams/dlq/sample/KafkaStreamsDlqSample.java
index 52d3efd..cc75398 100644
--- a/kafka-streams-samples/kafka-streams-dlq-sample/src/main/java/kafka/streams/dlq/sample/KafkaStreamsDlqSample.java
+++ b/kafka-streams-samples/kafka-streams-dlq-sample/src/main/java/kafka/streams/dlq/sample/KafkaStreamsDlqSample.java
@@ -16,22 +16,19 @@
package kafka.streams.dlq.sample;
-import org.apache.kafka.common.serialization.Serdes;
-import org.apache.kafka.streams.KeyValue;
-import org.apache.kafka.streams.kstream.KStream;
-import org.apache.kafka.streams.kstream.Materialized;
-import org.apache.kafka.streams.kstream.Serialized;
-import org.apache.kafka.streams.kstream.TimeWindows;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.stream.annotation.EnableBinding;
-import org.springframework.cloud.stream.annotation.StreamListener;
-import org.springframework.cloud.stream.binder.kafka.streams.annotations.KafkaStreamsProcessor;
-import org.springframework.messaging.handler.annotation.SendTo;
-
import java.util.Arrays;
import java.util.Date;
+import java.util.function.Function;
+
+import org.apache.kafka.common.serialization.Serdes;
+import org.apache.kafka.streams.KeyValue;
+import org.apache.kafka.streams.kstream.Grouped;
+import org.apache.kafka.streams.kstream.KStream;
+import org.apache.kafka.streams.kstream.Materialized;
+import org.apache.kafka.streams.kstream.TimeWindows;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
@SpringBootApplication
public class KafkaStreamsDlqSample {
@@ -40,21 +37,20 @@ public class KafkaStreamsDlqSample {
SpringApplication.run(KafkaStreamsDlqSample.class, args);
}
- @EnableBinding(KafkaStreamsProcessor.class)
public static class WordCountProcessorApplication {
- @StreamListener("input")
- @SendTo("output")
- public KStream, WordCount> process(KStream