Skip to content

Instantly share code, notes, and snippets.

@dtheodor
Created August 18, 2024 18:27
Show Gist options
  • Save dtheodor/49c0e0090165ae498d78ef9028a7d10b to your computer and use it in GitHub Desktop.
Save dtheodor/49c0e0090165ae498d78ef9028a7d10b to your computer and use it in GitHub Desktop.
Kafka producer configuration

Kafka producer configuration

  • linger.ms, alias: queue.buffering.max.ms, default: 5
    how long to wait to form message batches. basic latency vs throughput
  • batch.size, default: 1000000
    how big the batches can be. can be exceeded when a single message is bigger
  • batch.num.messages, default: 10000
    how many messages per batch size
  • message.max.bytes, default: 1000000
    maximum Kafka protocol request message size, 1MB
  • request.timeout.ms, default: 30000
    producer ack timeout
  • acks, alias: request.required.acks, default: -1
    whether to ack produced messages. 0 = no acks, -1/all = committed by all in sync replicas (ISRs)
  • delivery.timeout.ms, alias: message.timeout.ms, default: 300000
    how long to wait before failing with an error when trying to deliver a message, including retries
  • retries, alias: message.send.max.retries, default: 2147483647
    how many times to retry sending a failing message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment