From 094922545139648f88931b60ea85c5aec96fc769 Mon Sep 17 00:00:00 2001 From: Tamir Suliman Date: Sat, 27 Jan 2024 22:57:51 +0100 Subject: [PATCH] Create server.properties.j2 --- KAFKA/kafka-automation/server.properties.j2 | 79 +++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 KAFKA/kafka-automation/server.properties.j2 diff --git a/KAFKA/kafka-automation/server.properties.j2 b/KAFKA/kafka-automation/server.properties.j2 new file mode 100644 index 0000000..1758074 --- /dev/null +++ b/KAFKA/kafka-automation/server.properties.j2 @@ -0,0 +1,79 @@ +# Kafka server.properties configuration +# Template generated by Ansible + +# The id of the broker. This must be set to a unique integer for each broker. +broker.id={{ play_hosts.index(inventory_hostname) + 1 }} + +############################# Socket Server Settings ############################# + +# The address the socket server listens on. +listeners=PLAINTEXT://{{ inventory_hostname }}:9092 + +# Hostname and port the broker will advertise to producers and consumers. +#advertised.listeners=PLAINTEXT://{{ inventory_hostname }}.local.domain:9092 + +# Number of threads for network requests +num.network.threads=3 + +# Number of threads for I/O +num.io.threads=8 + +# Send buffer (SO_SNDBUF) size +socket.send.buffer.bytes=102400 + +# Receive buffer (SO_RCVBUF) size +socket.receive.buffer.bytes=102400 + +# Maximum size of request that the socket server will accept +socket.request.max.bytes=104857600 + +############################# Log Basics ############################# + +# Directories to store log files +log.dirs=/var/log/kafka-logs + +# Number of log partitions per topic +num.partitions=3 + +# Number of threads per data directory for log recovery and flushing +num.recovery.threads.per.data.dir=1 + +############################# Internal Topic Settings ############################# + +# Replication factors for internal topics +offsets.topic.replication.factor=1 +transaction.state.log.replication.factor=1 +transaction.state.log.min.isr=1 + +############################# Log Flush Policy ############################# + +# Interval at which to force a flush of data to disk +#log.flush.interval.messages=10000 +#log.flush.interval.ms=1000 + +############################# Log Retention Policy ############################# + +# Log retention hours +log.retention.hours=168 + +# Size-based log retention +#log.retention.bytes=1073741824 + +# Maximum size of a log segment file +log.segment.bytes=1073741824 + +# Check interval for log retention +log.retention.check.interval.ms=300000 + +############################# Zookeeper ############################# + +# Zookeeper connection string +zookeeper.connect={% for host in groups['kafka'] %}{{ hostvars[host]['ansible_fqdn'] }}:2181{% if not loop.last %},{% endif %}{% endfor %} + +# Zookeeper connection timeout +zookeeper.connection.timeout.ms=6000 + +############################# Group Coordinator Settings ############################# + +# Initial rebalance delay +group.initial.rebalance.delay.ms=0