79227686

Date: 2024-11-26 17:17:37
Score: 0.5
Natty:
Report link

Not sure if this is the best way but it works by using the InsertHeader transformer and setting the header name prefixed with "CamelHeader." so that it gets picked up by the connector.

Example yaml configuration:

  class: org.apache.camel.kafkaconnector.https.CamelHttpsSinkConnector
  config:
    transforms: addContentTypeHeader
    transforms.addAuthHeader.type: org.apache.kafka.connect.transforms.InsertHeader
    transforms.addAuthHeader.header: CamelHeader.Content-Type
    transforms.addAuthHeader.value.literal: application/json
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: mkueng