# KafkaHeader

Defines Kafka message headers to attach to each produced message. Each entry is a key=value pair.

This parameter applies to omkafka: write to Apache Kafka.

Name:

  KafkaHeader

Scope:

  action

Type:

  array[string]

Default:

  action=none

Required?:

  no

Introduced:

  8.2405.0

## Description

Specifies static headers that are added to every message sent to Kafka. The parameter accepts an array of key=value strings.

## Action usage

    action(type="omkafka"
           topic="mytopic"
           broker="localhost:9092"
           kafkaHeader=["foo=bar","answer=42"])

## See also

- omkafka: write to Apache Kafka

Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.