spring.cloud.stream.kafka.binder.headers not working as expected
I am trying to use spring.cloud.stream.kafka.binder.headers to transport a custom header that I am setting based upon a previous question . I have read in the documentation where... spring.cloud.stream.kafka.binder.headers The list of custom headers that will be transported by the binder. Default: empty. seems to suggest that setting a list (comma separated?) will cause a custom header to get transported in the Message<> , but the header is lost as soon as the kafka write is completed. My annotation creates the header as a part of the call to the MessagingGateway: @MessagingGateway(name =