---
title: "kafka-c(): Publish messages to Apache Kafka (C implementation)"
url: "https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-kafka-c/"
last_modified: "2026-08-02T11:39:11+02:00"
---

> For the complete documentation index, see [llms.txt](https://axoflow.com/docs/axosyslog-core/4.28/llms.txt).

# kafka-c(): Publish messages to Apache Kafka (C implementation)

AxoSyslog can directly publish log messages to the [Apache Kafka](http://kafka.apache.org) message bus, where subscribers can access them.

The `kafka-c()` destination uses the [librdkafka](https://github.com/confluentinc/librdkafka) client library, which scales well, uses memory efficiently, and needs no Java runtime. It replaces the earlier Java implementation, which AxoSyslog has removed. If you’re migrating a configuration written for the Java implementation, see [Shifting from Java implementation to C implementation](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-kafka-c/destination-kafka-c-from-java/index.md).

You can also configure this destination under the name `kafka()`, which is an SCL alias for `kafka-c()`. For details, see [kafka: Publish messages to Apache Kafka](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-kafka/index.md).

![How the C implementation of the kafka destination works with AxoSyslog](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-kafka-c/fig-kafka-c-implementation_hu_6184fce907527643.webp)

## Prerequisites

- AxoSyslog version 3.21 or later.
- This feature requires a separate module. Install the `axosyslog-mod-rdkafka` package on [Debian/Ubuntu](https://axoflow.com/docs/axosyslog-core/4.28/install/debian-ubuntu/index.md), or the `axosyslog-kafka` package on [RHEL and compatible distributions](https://axoflow.com/docs/axosyslog-core/4.28/install/rhel-fedora-almalinux/index.md). If the module isn’t installed, AxoSyslog fails to start with an [`unexpected LL_IDENTIFIER` error](https://axoflow.com/docs/axosyslog-core/4.28/chapter-troubleshooting-syslog-ng/unexpected-ll-identifier/index.md).

---

[Shifting from Java implementation to C implementation](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-kafka-c/destination-kafka-c-from-java/index.md)

[Before you begin](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-kafka-c/configuring-destinations-kafka-c-prer-decl/index.md)

[Flow control and the Kafka client](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-kafka-c/destination-kafka-c-flowcontrol/index.md)

[Options of the kafka() destination's C implementation](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-kafka-c/reference-destination-kafka-c/index.md)

Last modified August 2, 2026: [Adds required modules/packages to install and destination pages (553d6d9b)](https://github.com/axoflow/axosyslog-core-docs/commit/553d6d9be9a0e3ef444e62cc5351dd2ac764f01d)
