Skip to content

Commit 9bfc880

Browse files
committed
SendTo Doc Polishing
- explicitly mention the needed reply template.
1 parent fde3b20 commit 9bfc880

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/reference/asciidoc/kafka.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,10 @@ public class MultiListenerSendTo {
15951595
----
15961596
====
15971597

1598+
IMPORTANT: In order to support `@SendTo`, the listener container factory must be provided with a `KafkaTemplate` (in its `replyTemplate` property), which is used to send the reply.
1599+
This should be a `KafkaTemplate` and not a `ReplyingKafkaTemplate` which is used on the client-side for request/reply processing.
1600+
When using Spring Boot, boot will auto-configure the template into the factory; when configuring your own factory, it must be set as shown in the examples below.
1601+
15981602
Starting with version 2.2, you can add a `ReplyHeadersConfigurer` to the listener container factory.
15991603
This is consulted to determine which headers you want to set in the reply message.
16001604
The following example shows how to add a `ReplyHeadersConfigurer`:

0 commit comments

Comments
 (0)