You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolvesspring-projects#2348
The replying template supports a custom header for correlation for cases
when the consumer side is not a Spring app and uses a different header.
Support a custom header name on the consumer side, for cases where the
client side is not Spring and uses a different header.
Copy file name to clipboardExpand all lines: spring-kafka-docs/src/main/asciidoc/kafka.adoc
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -726,6 +726,9 @@ These header names are used by the `@KafkaListener` infrastructure to route the
726
726
Starting with version 2.3, you can customize the header names - the template has 3 properties `correlationHeaderName`, `replyTopicHeaderName`, and `replyPartitionHeaderName`.
727
727
This is useful if your server is not a Spring application (or does not use the `@KafkaListener`).
728
728
729
+
NOTE: Conversely, if the requesting application is not a spring application and puts correlation information in a different header, starting with version 3.0, you can configure a custom `correlationHeaderName` on the listener container factory and that header will be echoed back.
730
+
Previously, the listener had to echo custom correlation headers.
Copy file name to clipboardExpand all lines: spring-kafka/src/main/java/org/springframework/kafka/listener/adapter/MessagingMessageListenerAdapter.java
+27-8Lines changed: 27 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -128,11 +128,30 @@ public abstract class MessagingMessageListenerAdapter<K, V> implements ConsumerS
0 commit comments