6.5 Kafka Configuration

Important Client Configurations

The most important producer configurations are:

  • acks
  • compression
  • batch size

The most important consumer configuration is the fetch size.

All configurations are documented in the configuration section.

A Production Server Config

Here is an example production server configuration:

  1. # ZooKeeper
  2. zookeeper.connect=[list of ZooKeeper servers]
  3. # Log configuration
  4. num.partitions=8
  5. default.replication.factor=3
  6. log.dir=[List of directories. Kafka should have its own dedicated disk(s) or SSD(s).]
  7. # Other configurations
  8. broker.id=[An integer. Start with 0 and increment by 1 for each new broker.]
  9. listeners=[list of listeners]
  10. auto.create.topics.enable=false
  11. min.insync.replicas=2
  12. queued.max.requests=[number of concurrent requests]

Our client configuration varies a fair amount between different use cases.