Skip to content

Kafka Configuration

This page describes every Kafka protocol configuration item. For global/base configuration see Broker Configuration; for other protocols see MQTT Configuration, AMQP Configuration, NATS Configuration.

[kafka_runtime]

Kafka protocol service configuration.

toml
[kafka_runtime]
tcp_port = 9092
max_fetch_bytes = 4194304
max_message_bytes = 1048588
max_describe_topic_partitions = 2000
auto_create_topics_enable = true

[kafka_runtime.sasl]
enabled = false
mechanisms = ["SCRAM-SHA-256", "SCRAM-SHA-512"]
ConfigurationTypeDefaultDescription
tcp_portu329092Kafka protocol TCP listener port
max_fetch_bytesu324194304 (4 MB)Upper bound, per partition, on how many bytes a Fetch response may return, regardless of the client's max_bytes/partition_max_bytes
max_message_bytesu321048588Upper bound on the size of a single produced record batch (matches Kafka's message.max.bytes/max.message.bytes); a larger batch is rejected with MESSAGE_TOO_LARGE
max_describe_topic_partitionsu322000Upper bound on how many partitions a single DescribeTopicPartitions response may return, regardless of the client's response_partition_limit
auto_create_topics_enablebooltrueWhether to auto-create a Topic on first produce/fetch to an unknown name (overridable via cluster dynamic config; the config_type is still KafkaDynamic)

[kafka_runtime.sasl] SASL authentication configuration:

ConfigurationTypeDefaultDescription
enabledboolfalseWhether SASL authentication is enabled; when false, connections are accepted without authentication and the handshake/authenticate handlers stay inert
mechanismsarray["SCRAM-SHA-256", "SCRAM-SHA-512"]SASL mechanisms the broker offers

Further Reading

🎉 既然都登录了 GitHub,不如顺手给我们点个 Star 吧!⭐ 你的支持是我们最大的动力 🚀