Configuring Apache Kafka brokers
To implement scalable data loading, you must configure at least one Apache Kafka broker.
Apache Kafka is bundled with Log Analysis. The sample configuration files for Apache Kafka are in the <HOME>/IBM®/LogAnalysis/kafka/test-configs/kafka-configs directory.
Create one partition per topic for every two physical processors on the server where the broker is installed. For example, if you use eight core processors, create four partitions per topic in the Apache Kafka broker.
To implement High Availability messaging, you must create multiple brokers on different servers. To set up multiple brokers, update the configuration files as described in step 3. Set it to the same Apache ZooKeeper server and update the broker ID so that it is unique for each broker.
############################# Server Basics #############################
broker.id=0
############################# Socket Server Settings #############################
port=17991
#host.name=<local_host>
#advertised.host.name=<hostname_routable_by_clients>
#advertised.port=<port accessible by clients>
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=1048576
socket.receive.buffer.bytes=1048576
socket.request.max.bytes=104857600
queued.max.requests=16
fetch.purgatory.purge.interval.requests=100
producer.purgatory.purge.interval.requests=100
############################# Log Basics #############################
log.dirs=<Log_dir_path>
num.partitions=4
num.recovery.threads.per.data.dir=1
log.index.size.max.bytes=154624
log.index.interval.bytes=4096
message.max.bytes=1000000
auto.create.topics.enable=true
############################# Log Flush Policy #############################
default.replication.factor=1
log.flush.interval.messages=100000
log.flush.interval.ms=50000
log.flush.scheduler.interval.ms=2000
############################# Log Retention Policy #############################
log.retention.hours=168
#log.retention.bytes=1073741824
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
log.cleaner.enable=false
log.roll.hours=168
############################# Zookeeper #############################
zookeeper.connect=<localhost>:17981
zookeeper.connection.timeout.ms=6000
zk.sync.time.ms=2000
# Replication configurations
num.replica.fetchers=4
replica.fetch.max.bytes=1048576
replica.fetch.wait.max.ms=500
replica.high.watermark.checkpoint.interval.ms=5000
replica.socket.timeout.ms=30000
replica.socket.receive.buffer.bytes=65536
replica.lag.time.max.ms=10000
replica.lag.max.messages=4000
controller.socket.timeout.ms=30000
controller.message.queue.size=10
###################################
# Durability and hardening
###################################
retries=0
acks=all