Forward HTTP headers as Kafka record headers (allowlist mode)v3.15+

Use config.headers to copy HTTP request headers onto the produced Kafka record as native record headers. This makes routing, tracing, and tenancy context available to consumers without parsing the message payload.

In allowlist mode (forward_all_by_default: false), only headers listed in include_headers are forwarded. Use name_mappings to rename an HTTP header to a different record header key, for example renaming x-request-id to trace-id.

Environment variables

  • KAFKA_TOPIC: The name of your Kafka topic.

Set up the plugin

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!