Medium Kafka & Messaging Patterns
Dead Letter Queue Pattern
Simulate a DLQ pattern. Process messages "msg-1", "msg-2", "POISON", "msg-3". If a message equals "POISON", route it to a DLQ (print "DLQ: POISON"), otherwise process normally (print "Processed: msg-1"). Use Flux operators to implement this.
DLQ (Dead Letter Queue) handles messages that cannot be processed normally.
Expected
Processed: msg-1 Processed: msg-2 DLQ: POISON Processed: msg-3
Main.kt