Correct DeadLetterPublishingRecoverer example to use KafkaOperations (#3911)

Signed-off-by: Seonghyeon Cho <seonghyeoncho96@gmail.com>
(cherry picked from commit 56fa428e80)
This commit is contained in:
Seonghyeon Cho (조성현)
2025-05-20 00:57:17 +09:00
committed by Spring Builds
parent af66a68f13
commit 050de0027a

View File

@@ -673,7 +673,7 @@ Here is an example of configuring the publisher with `KafkaTemplate`+++s+++ that
@Bean
public DeadLetterPublishingRecoverer publisher(KafkaTemplate<?, ?> stringTemplate,
KafkaTemplate<?, ?> bytesTemplate) {
Map<Class<?>, KafkaTemplate<?, ?>> templates = new LinkedHashMap<>();
Map<Class<?>, KafkaOperations<?, ?>> templates = new LinkedHashMap<>();
templates.put(String.class, stringTemplate);
templates.put(byte[].class, bytesTemplate);
return new DeadLetterPublishingRecoverer(templates);