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 ReplyHeadersConfigurer
A strategy for configuring which headers, if any, should be set in a reply message.
Since:
2.2
Author:
Gary Russell
  • Method Summary

    Modifier and Type
    Method
    Description
    default Map<String,Object>
    A map of additional headers to add to the reply message.
    boolean
    shouldCopy(String headerName, Object headerValue)
    Return true if the header should be copied to the reply message.
  • Method Details

    • shouldCopy

      boolean shouldCopy(String headerName, Object headerValue)
      Return true if the header should be copied to the reply message. KafkaHeaders.CORRELATION_ID will not be offered; it is always copied. MessageHeaders.ID and MessageHeaders.TIMESTAMP are never copied. KafkaHeaders.RECEIVED* headers are never copied.
      Parameters:
      headerName - the header name.
      headerValue - the header value.
      Returns:
      true to copy.
    • additionalHeaders

      @Nullable default Map<String,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.