Skip to content

Commit

Permalink
Create server.properties.j2
Browse files Browse the repository at this point in the history
  • Loading branch information
allamiro committed Jan 27, 2024
1 parent 5b96e5e commit 0949225
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions KAFKA/kafka-automation/server.properties.j2
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0949225

Please sign in to comment.