Clarification on Kafka integration (kumo.kafka)

Hello team,

I’m currently running KumoMTA 2025.10.06-5ec871ab on Rocky Linux 9, and I’ve been testing direct Kafka integration for centralized log management.

In my policy file, I attempted to load:
“local kafka = require ‘kumo.kafka’
local kafka_producer = kafka.build_producer {
brokers = {‘127.0.0.1:9092’},
}”

However, during validation (kumod --validate) or service startup, the following error occurs:
“Error: module ‘kumo.kafka’ not found:
no field package.preload[‘kumo.kafka’]

can’t load C modules in safe mode”

This suggests that:

The kumo.kafka Lua binding isn’t included in the distributed RPM build, or
The safe Lua runtime used by kumod blocks loading native (C) modules.

My understanding is that Kafka support might be available only when compiling with the feature flag:
“cargo build --release --features kafka”

Could you please confirm whether the Kafka producer integration is intended to be functional in the official builds?

If not, would you recommend using an external log shipping pipeline (e.g., Filebeat / Fluent Bit → Kafka) as the current best practice for production environments?

Everything else in KumoMTA works perfectly — it’s just unclear whether Kafka native integration is still experimental or intentionally omitted from standard binaries.

Thanks for your time and for the outstanding work you’re doing with this platform.

It is intended to be functional, but what you posted doesn’t follow the examples in the docs.

Try kumo.kafka.build_producer rather than trying to instanciate a local kafka first.

Thanks for the clarification! You were right — I was instantiating Kafka incorrectly.
After switching to kumo.kafka.build_producer as shown in the docs, the policy validated successfully and KumoMTA is running fine now.
Appreciate the help!