|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 2 | +# contributor license agreements. See the NOTICE file distributed with |
| 3 | +# this work for additional information regarding copyright ownership. |
| 4 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 5 | +# (the "License"); you may not use this file except in compliance with |
| 6 | +# the License. You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +# see kafka.server.KafkaConfig for additional details and defaults |
| 16 | + |
| 17 | +############################# Server Basics ############################# |
| 18 | + |
| 19 | +# The id of the broker. This must be set to a unique integer for each broker. |
| 20 | +broker.id={broker_id} |
| 21 | + |
| 22 | +############################# Socket Server Settings ############################# |
| 23 | + |
| 24 | +listeners={transport}://{host}:{port} |
| 25 | +security.inter.broker.protocol={transport} |
| 26 | + |
| 27 | +{sasl_config} |
| 28 | + |
| 29 | +ssl.keystore.location={ssl_dir}/kafka.server.keystore.jks |
| 30 | +ssl.keystore.password=foobar |
| 31 | +ssl.key.password=foobar |
| 32 | +ssl.truststore.location={ssl_dir}/kafka.server.truststore.jks |
| 33 | +ssl.truststore.password=foobar |
| 34 | + |
| 35 | +# The port the socket server listens on |
| 36 | +#port=9092 |
| 37 | + |
| 38 | +# Hostname the broker will bind to. If not set, the server will bind to all interfaces |
| 39 | +#host.name=localhost |
| 40 | + |
| 41 | +# Hostname the broker will advertise to producers and consumers. If not set, it uses the |
| 42 | +# value for "host.name" if configured. Otherwise, it will use the value returned from |
| 43 | +# java.net.InetAddress.getCanonicalHostName(). |
| 44 | +#advertised.host.name=<hostname routable by clients> |
| 45 | + |
| 46 | +# The port to publish to ZooKeeper for clients to use. If this is not set, |
| 47 | +# it will publish the same port that the broker binds to. |
| 48 | +#advertised.port=<port accessible by clients> |
| 49 | + |
| 50 | +# The number of threads handling network requests |
| 51 | +num.network.threads=3 |
| 52 | + |
| 53 | +# The number of threads doing disk I/O |
| 54 | +num.io.threads=8 |
| 55 | + |
| 56 | +# The send buffer (SO_SNDBUF) used by the socket server |
| 57 | +socket.send.buffer.bytes=102400 |
| 58 | + |
| 59 | +# The receive buffer (SO_RCVBUF) used by the socket server |
| 60 | +socket.receive.buffer.bytes=102400 |
| 61 | + |
| 62 | +# The maximum size of a request that the socket server will accept (protection against OOM) |
| 63 | +socket.request.max.bytes=104857600 |
| 64 | + |
| 65 | + |
| 66 | +############################# Log Basics ############################# |
| 67 | + |
| 68 | +# A comma seperated list of directories under which to store log files |
| 69 | +log.dirs={tmp_dir}/data |
| 70 | + |
| 71 | +# The default number of log partitions per topic. More partitions allow greater |
| 72 | +# parallelism for consumption, but this will also result in more files across |
| 73 | +# the brokers. |
| 74 | +num.partitions={partitions} |
| 75 | +default.replication.factor={replicas} |
| 76 | + |
| 77 | +## Short Replica Lag -- Drops failed brokers out of ISR |
| 78 | +replica.lag.time.max.ms=1000 |
| 79 | +replica.socket.timeout.ms=1000 |
| 80 | + |
| 81 | +############################# Log Flush Policy ############################# |
| 82 | + |
| 83 | +# Messages are immediately written to the filesystem but by default we only fsync() to sync |
| 84 | +# the OS cache lazily. The following configurations control the flush of data to disk. |
| 85 | +# There are a few important trade-offs here: |
| 86 | +# 1. Durability: Unflushed data may be lost if you are not using replication. |
| 87 | +# 2. Latency: Very large flush intervals may lead to latency spikes when the flush does occur as there will be a lot of data to flush. |
| 88 | +# 3. Throughput: The flush is generally the most expensive operation, and a small flush interval may lead to exceessive seeks. |
| 89 | +# The settings below allow one to configure the flush policy to flush data after a period of time or |
| 90 | +# every N messages (or both). This can be done globally and overridden on a per-topic basis. |
| 91 | + |
| 92 | +# The number of messages to accept before forcing a flush of data to disk |
| 93 | +#log.flush.interval.messages=10000 |
| 94 | + |
| 95 | +# The maximum amount of time a message can sit in a log before we force a flush |
| 96 | +#log.flush.interval.ms=1000 |
| 97 | + |
| 98 | +############################# Log Retention Policy ############################# |
| 99 | + |
| 100 | +# The following configurations control the disposal of log segments. The policy can |
| 101 | +# be set to delete segments after a period of time, or after a given size has accumulated. |
| 102 | +# A segment will be deleted whenever *either* of these criteria are met. Deletion always happens |
| 103 | +# from the end of the log. |
| 104 | + |
| 105 | +# The minimum age of a log file to be eligible for deletion |
| 106 | +log.retention.hours=168 |
| 107 | + |
| 108 | +# A size-based retention policy for logs. Segments are pruned from the log as long as the remaining |
| 109 | +# segments don't drop below log.retention.bytes. |
| 110 | +#log.retention.bytes=1073741824 |
| 111 | + |
| 112 | +# The maximum size of a log segment file. When this size is reached a new log segment will be created. |
| 113 | +log.segment.bytes=1073741824 |
| 114 | + |
| 115 | +# The interval at which log segments are checked to see if they can be deleted according |
| 116 | +# to the retention policies |
| 117 | +log.retention.check.interval.ms=300000 |
| 118 | + |
| 119 | +# By default the log cleaner is disabled and the log retention policy will default to just delete segments after their retention expires. |
| 120 | +# If log.cleaner.enable=true is set the cleaner will be enabled and individual logs can then be marked for log compaction. |
| 121 | +log.cleaner.enable=false |
| 122 | + |
| 123 | +# tune down offset topics to reduce setup time in tests |
| 124 | +offsets.commit.timeout.ms=500 |
| 125 | +offsets.topic.num.partitions=2 |
| 126 | +offsets.topic.replication.factor=1 |
| 127 | + |
| 128 | +# Allow shorter session timeouts for tests |
| 129 | +group.min.session.timeout.ms=1000 |
| 130 | + |
| 131 | + |
| 132 | +############################# Zookeeper ############################# |
| 133 | + |
| 134 | +# Zookeeper connection string (see zookeeper docs for details). |
| 135 | +# This is a comma separated host:port pairs, each corresponding to a zk |
| 136 | +# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002". |
| 137 | +# You can also append an optional chroot string to the urls to specify the |
| 138 | +# root directory for all kafka znodes. |
| 139 | +zookeeper.connect={zk_host}:{zk_port}/{zk_chroot} |
| 140 | + |
| 141 | +# Timeout in ms for connecting to zookeeper |
| 142 | +zookeeper.connection.timeout.ms=30000 |
| 143 | +# We want to expire kafka broker sessions quickly when brokers die b/c we restart them quickly |
| 144 | +zookeeper.session.timeout.ms=500 |
0 commit comments