<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kafkahandler on Devops Monk</title><link>https://devops-monk.com/tags/kafkahandler/</link><description>Recent content in Kafkahandler on Devops Monk</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 04 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://devops-monk.com/tags/kafkahandler/index.xml" rel="self" type="application/rss+xml"/><item><title>@SendTo and @KafkaHandler: Chaining Consumers and Multi-Type Dispatch</title><link>https://devops-monk.com/tutorials/spring-kafka/sendto-kafkahandler/</link><pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/spring-kafka/sendto-kafkahandler/</guid><description>@SendTo — Chaining Listeners @SendTo on a @KafkaListener method automatically sends the return value to another Kafka topic. This is how you build event pipelines without manually calling KafkaTemplate.send() in your listener.
flowchart LR T1["orders\n(OrderPlacedEvent)"] T2["orders-confirmed\n(OrderConfirmedEvent)"] T3["inventory-events\n(StockReservedEvent)"] T1 -->|"@KafkaListener\n@SendTo"| L1["confirmOrder()"] L1 --> T2 T2 -->|"@KafkaListener\n@SendTo"| L2["reserveStock()"] L2 --> T3 Basic @SendTo @KafkaListener(topics = &amp;#34;orders&amp;#34;, groupId = &amp;#34;confirmation-service&amp;#34;) @SendTo(&amp;#34;orders-confirmed&amp;#34;) public OrderConfirmedEvent onOrder(OrderPlacedEvent event) { // Return value is automatically sent to &amp;#34;orders-confirmed&amp;#34; return new OrderConfirmedEvent( event.</description></item></channel></rss>