Interface ReplyHeadersConfigurer
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ReplyHeadersConfigurerA strategy for configuring which headers, if any, should be set in a reply message.- Since:
- 2.2
- Author:
- Gary Russell
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.Map<java.lang.String,java.lang.Object>additionalHeaders()A map of additional headers to add to the reply message.booleanshouldCopy(java.lang.String headerName, java.lang.Object headerValue)Return true if the header should be copied to the reply message.
-
-
-
Method Detail
-
shouldCopy
boolean shouldCopy(java.lang.String headerName, java.lang.Object headerValue)Return true if the header should be copied to the reply message.KafkaHeaders.CORRELATION_IDwill not be offered; it is always copied.MessageHeaders.IDandMessageHeaders.TIMESTAMPare never copied.KafkaHeaders.RECEIVED*headers are never copied.- Parameters:
headerName- the header name.headerValue- the header value.- Returns:
- true to copy.
-
additionalHeaders
@Nullable default java.util.Map<java.lang.String,java.lang.Object> additionalHeaders()
A map of additional headers to add to the reply message. IMPORTANT: Any existing headers with the same name will be replaced by those returned by this method.- Returns:
- the headers.
-
-