Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Kafka Configuration

This section provides comprehensive configuration reference for Apache Kafka deployments, covering server-side settings, topic configuration, security, and operational parameters.


Kafka configuration operates at multiple levels, each with different scopes and modification methods:

Kafka configuration levels and how each is appliedKafka configuration levels and how each is appliedConfiguration LevelsStatic Configuration(server.properties)Dynamic Broker Config(kafka-configs.sh)Topic Configuration(per-topic overrides)Client Configuration(producer/consumer)Requires restartNo restart neededImmediate effectPer-connectionsome settingscan be dynamicdefaults fornew topicsaffectsclient behavior
LevelScopePersistenceModification
StaticBrokerserver.propertiesRequires restart
Dynamic BrokerBroker/ClusterMetadataNo restart
TopicSingle topicMetadataImmediate
ClientConnectionClient configPer-connection

Server-side configuration for Kafka brokers:

  • Node identity and KRaft/ZooKeeper settings
  • Listeners and network configuration
  • Storage and retention settings
  • Replication and ISR management
  • Threading and performance tuning
  • Dynamic configuration updates

Per-topic settings that override broker defaults:

  • Retention policies (time and size)
  • Cleanup policies (delete and compact)
  • Compression settings
  • Replication and ISR requirements
  • Segment configuration
  • Message size limits

Access Control List management for authorization:

  • Enabling authorization
  • Resource types and operations
  • Managing ACLs with kafka-acls.sh
  • Common ACL patterns for producers, consumers, and streams
  • Wildcard and prefix patterns
  • Host-based restrictions

Client resource quotas for rate limiting:

  • Producer and consumer byte rate quotas
  • Request percentage quotas
  • User, client ID, and combined quotas
  • Quota resolution and precedence
  • Multi-tenant quota patterns
  • Monitoring throttling

Remote storage configuration for long-term retention:

  • Enabling tiered storage
  • S3, GCS, and Azure Blob backends
  • Local vs remote retention settings
  • Performance tuning
  • Monitoring and troubleshooting

JVM and environment configuration:

  • JAAS and security properties
  • SSL/TLS debugging
  • JVM memory and GC settings
  • JMX configuration
  • Logging configuration
  • Environment variables

External secret management integration:

  • Built-in providers (file, environment, directory)
  • HashiCorp Vault integration
  • AWS Secrets Manager
  • Azure Key Vault
  • GCP Secret Manager
  • Custom provider implementation

Edit server.properties and restart the broker:

server.properties
broker.id=1
log.dirs=/var/kafka-logs
num.partitions=3

Use kafka-configs.sh for runtime changes:

Terminal window
# Broker-level dynamic config
kafka-configs.sh --bootstrap-server kafka:9092 \
--entity-type brokers \
--entity-name 1 \
--alter \
--add-config log.retention.ms=86400000
# Cluster-wide default
kafka-configs.sh --bootstrap-server kafka:9092 \
--entity-type brokers \
--entity-default \
--alter \
--add-config log.retention.ms=86400000
# Topic-level config
kafka-configs.sh --bootstrap-server kafka:9092 \
--entity-type topics \
--entity-name events \
--alter \
--add-config retention.ms=172800000
Terminal window
# View broker configuration
kafka-configs.sh --bootstrap-server kafka:9092 \
--entity-type brokers \
--entity-name 1 \
--describe
# View topic configuration
kafka-configs.sh --bootstrap-server kafka:9092 \
--entity-type topics \
--entity-name events \
--describe
# View all dynamic configs
kafka-configs.sh --bootstrap-server kafka:9092 \
--entity-type brokers \
--describe --all

FilePurpose
server.propertiesBroker configuration
jvm.optionsJVM settings
log4j.propertiesLogging configuration
jaas.confJAAS security configuration
connect-distributed.propertiesKafka Connect workers
/etc/kafka/
├── server.properties # Core broker config
├── jvm.options # JVM settings
├── log4j.properties # Logging
├── jaas.conf # JAAS config
├── ssl/
│ ├── kafka.keystore.jks # Broker keystore
│ └── kafka.truststore.jks # Trust store
└── secrets/
└── credentials # Sensitive values

SettingLocationRecommended
min.insync.replicasBroker/Topic2 (with RF=3)
default.replication.factorBroker3
unclean.leader.election.enableBroker/Topicfalse
acksProducerall
enable.idempotenceProducertrue
SettingLocationRecommended
auto.create.topics.enableBrokerfalse
allow.everyone.if.no.acl.foundBrokerfalse
ssl.client.authBrokerrequired
Security protocolListenersSASL_SSL
SettingLocationRecommended
num.io.threadsBroker2× CPU cores
num.network.threadsBroker2-3 per listener
compression.typeProducer/Topiclz4 or zstd
batch.sizeProducer65536-131072
SettingLocationRecommended
log.retention.hoursBroker/TopicBased on requirements
JMX enabledJVM optionsYes
GC loggingJVM optionsEnabled
QuotasDynamic configSet for tenants