Cobra1117
Cobra1117

Reputation: 1402

Spring Cloud Stream Kafka add headers to only one binding

The reference manual for Spring Cloud Stream says that you can use the property "spring.cloud.stream.kafka.binder.headers" to set the headers for all bindings. Is there a way to set the headers for a specific binding? For example, something like this:

spring.cloud.stream:
  bindings:
    input:
      destination: input-topic
      headers: header-for-input-only
    output:
      destination: input-topic
      headers: header-for-output-only

Upvotes: 0

Views: 524

Answers (1)

Marius Bogoevici
Marius Bogoevici

Reputation: 2410

Unfortunately not, it's a binder-wide setting. More granular settings could be a new feature.

Upvotes: 1

Related Questions