Class DefaultDebeziumHeaderMapper

java.lang.Object
org.springframework.integration.debezium.support.DefaultDebeziumHeaderMapper
All Implemented Interfaces:
HeaderMapper<List<io.debezium.engine.Header<Object>>>

public class DefaultDebeziumHeaderMapper extends Object implements HeaderMapper<List<io.debezium.engine.Header<Object>>>
Specifies how to convert Debezium ChangeEvent.headers() into a MessageHeaders.
Since:
6.2
Author:
Christian Tzolov, Artem Bilan
  • Constructor Details

    • DefaultDebeziumHeaderMapper

      public DefaultDebeziumHeaderMapper()
  • Method Details

    • setHeaderNamesToMap

      public void setHeaderNamesToMap(String... headerNames)
      Comma-separated list of names of Debezium's Change Event headers to be mapped to the outbound Message headers. The Debezium New Record State Extraction 'add.headers' property is used to configure the metadata to be set in the produced ChangeEvent headers. Note that you must prefix the 'headerNames' used the 'setHeaderNamesToMap' with the prefix configured by the 'add.headers.prefix' debezium property. Later defaults to '__'. For example for 'add.headers=op,name' and 'add.headers.prefix=__' you should use headerNames == "__op", "__name".
      Parameters:
      headerNames - The values in this list can be a simple patterns to be matched against the header names.
      See Also:
    • toHeaders

      public MessageHeaders toHeaders(List<io.debezium.engine.Header<Object>> debeziumHeaders)
      Specified by:
      toHeaders in interface HeaderMapper<List<io.debezium.engine.Header<Object>>>
    • fromHeaders

      public void fromHeaders(MessageHeaders headers, List<io.debezium.engine.Header<Object>> target)
      Specified by:
      fromHeaders in interface HeaderMapper<List<io.debezium.engine.Header<Object>>>