Correct DeadLetterPublishingRecoverer example to use KafkaOperations (#3911)

**Auto-cherry-pick to `3.3.x` & `3.2.x`**

Signed-off-by: Seonghyeon Cho <seonghyeoncho96@gmail.com>
This commit is contained in:
Seonghyeon Cho (조성현)
2025-05-20 00:57:17 +09:00
committed by GitHub
parent f83cb266e7
commit 56fa428e80

View File

@@ -702,7 +702,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);