I have to set a custom header in the kafka message, my kafka cluster natively supports headers (1.x.x). I am currently using springCloudVersion=Finchley.RELEASE.
When I am setting property
default:
producer:
headerMode: none
None of the headers are coming in the output.
On the other hand, If I am setting
default:
producer:
headerMode: headers
Many headers including contentType
and spring_json_header_types
are coming in the header which greatly affects the throughput. Kafka being a language/framework agnostic message delivery mechanism, I feel, spring should provide a way to only include user-provided headers. Is there any work around to get only user-set headers to the kafka topic while suppressing all the spring cloud related headers.