第 1 章 代理配置属性
advertised.listenerstype: string
Default: null
Importance: high
Dynamic update: per-broker
如果与监听程序配置属性不同,则
监听程序供客户端发布至 ZooKeeper。在 IaaS 环境中,这可能需要与代理绑定的接口不同。如果没有设置,则将使用监听程序的值。与监听器不同,它不可用于公告 0.0.0.0 meta-address。与监听器不同,此属性中可能存在重复的端口,以便可以配置一个监听程序来公告另一个监听程序的地址。这在使用外部负载均衡器时很有用。auto.create.topics.enabletype: boolean
Default: true
Importance: high
Dynamic update: read-only
在服务器上启用自动创建主题。
auto.leader.rebalance.enabletype: boolean
Default: true
Importance: high
Dynamic update: read-only
启用自动领导平衡。后台线程会定期检查分区领导程序的分布,具体由
leader.imbalance.check.interval.seconds进行配置。如果领导机平衡超过leader.imbalance.per.broker.percentage,则触发对首选分区的领导重新平衡。background.threadstype: int
Default: 10
Valid Values: [1,…]
Importance: high
Dynamic update: cluster-wide
用于各种后台处理任务的线程数量。
broker.idtype: int
Default: -1
Importance: high
Dynamic update: read-only
此服务器的代理 ID。如果未设置,则会生成唯一的代理 id。为了避免 zookeeper 生成代理 ID 和用户配置的代理 ID 之间的冲突,则生成的代理 ID 从 reserved.broker.max.id + 1.
compression.typetype: string
Default: producer
Importance: high
Dynamic update: cluster-wide
指定给定主题的最后一个压缩类型。此配置接受标准的压缩码c('gzip', 'snappy', 'lz4', 'zstd')。它还接受"未压缩的",它等同于没有压缩 ; 和 'producer' 表示由制作者保留原始压缩代码。
control.plane.listener.nametype: string
Default: null
Importance: high
Dynamic update: read-only
用于控制器和代理间通信的监听程序名称。代理将使用 control.plane.listener.name 在 listeners 列表中查找端点,以侦听来自控制器的连接。例如,如果代理的配置为 : INTERNAL://192.1.1.8:9092, EXTERNAL://10.1.1.5:9093, CONTROLLER://192.1.1.8:9094 listener.security.protocol.map = INTERNAL:PLAINTEXT, EXTERNAL:SSL, CONTROLLER:SSL control.plane.listener.name = CONTROLLER://192.name = INTERNAL:PLAINTEXT = INTERNAL:SSL.909.在控制器一侧,当通过 zookeeper 发现代理发布端点时,它将使用 control.plane.listener.name 来查找端点,它将用来建立与代理的连接。例如,如果代理在 zookeeper 上公布的端点为 : "endpoints" : ["INTERNAL://broker1.example.com:9092","EXTERNAL://broker1.example.com:9093","CONTROLLER://broker1.example.com:9094"],控制器的配置为 : listener.security.protocol.map = : INTTERNAL://broker1.example.com:9093","CONTROLLER://broker1.example. EXTERNAL:SSL, CONTROLLER:SSL control.plane.listener.name = CONTROLLER,然后控制器将使用 "broker1.example.com:9094" with security protocol "SSL" 连接到代理。如果没有明确配置,则默认值为 null,并且没有用于控制器连接的专用端点。
controller.listener.namestype: string
Default: null
Importance: high
Dynamic update: read-only
控制器使用的监听程序名称的逗号分隔列表。这在 KRaft 模式下运行时需要。与控制器仲裁通信时,代理总是使用该列表中的第一个监听程序。注: 基于 ZK 的控制器不应该设置此配置。
controller.quorum.election.backoff.max.mstype: int
Default: 1000(1第二个)
Importance: high
Dynamic update: read-only
在开始新选举前,以毫秒为单位的最长时间。这在帮助防止网格锁定选举的二进制指数级 backoff 机制中使用。
controller.quorum.election.timeout.mstype: int
Default: 1000(1第二个)
Importance: high
Dynamic update: read-only
在触发新选举机制前,需要等待的最大时间(以毫秒为单位),而无需从领导机中获取。
controller.quorum.fetch.timeout.mstype: int
Default: 2000(2 秒)
Importance: high
Dynamic update: read-only
从当前领导人获取成功时没有从当前领导人获取的最大时间,然后成为投票者的选举机制;最大时间从大多数仲裁获得,然后询问您是否有新的领导时期。
controller.quorum.voterstype: list
Default: ""
Valid Values: non-empty list
Importance: high
Dynamic update: read-only
在以逗号分开的 {id
}@{host}:{port}:{port}:{port} 列表中显示 voters 集合的 id/endpoint 信息映射。例如:1@localhost:9092,2@localhost:9093,3@localhost:9094.delete.topic.enabletype: boolean
Default: true
Importance: high
Dynamic update: read-only
启用删除主题。如果关闭了此配置,通过管理工具删除主题将无效。
leader.imbalance.check.interval.secondstype: long
Default: 300
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
控制器触发分区重新平衡检查的频率。
leader.imbalance.per.broker.percentagetype: int
Default: 10
Importance: high
Dynamic update: read-only
每个代理允许的 leader imbalance 比率。如果每个代理超过这个值,控制器将触发领导平衡。该值以百分比的形式指定。
监听程序Type: string
Default: PLAINTEXT://:9092
Importance: high
Dynamic update: per-broker
侦听器列表 - 我们将侦听的 URI 和侦听器名称分隔的 URI 列表。如果监听器名称不是安全协议,则必须设置
listener.security.protocol.map。侦听器的名称和端口号必须是唯一的。将 hostname 指定为 0.0.0.0 以绑定到所有接口。将 hostname 留空,以绑定到默认接口。法律监听器列表示例:PLAINTEXT://myhost:9092,SSL://:9091 CLIENT://0.0.0.0:9092,REPLICATION://localhost:9093.log.dirtype: string
Default: /tmp/kafka-logs
Importance: high
Dynamic update: read-only
保存日志数据的目录(log.dirs 属性的upplemental)。
log.dirstype: string
Default: null
Importance: high
Dynamic update: read-only
保存日志数据的目录。如果没有设置,则使用 log.dir 的值。
log.flush.interval.messagestype: long
Default: 9223372036854775807
Valid Values: [1,…]
Importance: high
Dynamic update: cluster-wide
在消息冲刷到磁盘前,日志分区中累计的消息数量。
log.flush.interval.mstype: long
Default: null
Importance: high
Dynamic update: cluster-wide
在刷新到磁盘前,任何主题中的消息保存在内存中的最长时间(ms)。如果没有设置,则使用 log.flush.scheduler.interval.ms 值。
log.flush.offset.checkpoint.interval.mstype: int
Default: 60000(1 minute)
Valid Values: [0,…]
Importance: high
Dynamic update: read-only
更新最后一次冲刷的持久记录的频率,该记录充当日志恢复点。
log.flush.scheduler.interval.mstype: long
Default: 9223372036854775807
Importance: high
Dynamic update: read-only
日志冲刷器检查是否有日志需要冲刷到磁盘的频率。
log.flush.start.offset.checkpoint.interval.mstype: int
Default: 60000(1 minute)
Valid Values: [0,…]
Importance: high
Dynamic update: read-only
我们更新日志启动偏移记录的频率。
log.retention.bytestype: long
Default: -1
Importance: high
Dynamic update: cluster-wide
在删除日志前的最大大小。
log.retention.hourstype: int
Default: 168
Importance: high
Dynamic update: read-only
在删除日志文件前(以小时为单位)保留日志文件的小时数,用于log.retention.ms 属性。
log.retention.minutestype: int
Default: null
Importance: high
Dynamic update: read-only
在删除日志文件前保留日志文件的数量(以分钟为单位),使用 secondary(在分钟内)记录日志.retention.ms 属性。如果没有设置,则使用 log.retention.hours 的值。
log.retention.mstype: long
Default: null
Importance: high
Dynamic update: cluster-wide
在删除日志文件前保留日志文件的数量(以毫秒为单位),则使用 log.retention.minutes 的值。如果设置为 -1,则不应用时间限制。
log.roll.hourstype: int
Default: 168
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
推出新日志段前(以小时为单位),log.roll.ms 属性前的最长时间。
log.roll.jitter.hourstype: int
Default: 0
Valid Values: [0,…]
Importance: high
Dynamic update: read-only
从 logRollTimeMillis(小时)中减去最大 jitter (以小时为单位),从 log.roll.jitter.ms 属性中减去。
log.roll.jitter.mstype: long
Default: null
Importance: high
Dynamic update: cluster-wide
从 logRollTimeMillis(毫秒)中减去的最大值。如果没有设置,则使用 log.roll.jitter.hours 中的值。
log.roll.mstype: long
Default: null
Importance: high
Dynamic update: cluster-wide
推出新日志片段前的最长时间(以毫秒为单位)。如果没有设置,则使用 log.roll.hours 中的值。
log.segment.bytestype: int
Default: 1073741824(1 gibibyte)
Valid Values: [14,…]
Importance: high
Dynamic update: cluster-wide
单个日志文件的最大大小。
log.segment.delete.delay.mstype: long
Default: 60000(1 minute)
Valid Values: [0,…]
Importance: high
Dynamic update: cluster-wide
从文件系统中删除文件前等待的时间。
message.max.bytestype: int
Default: 1048588
Valid Values: [0,…]
Importance: high
Dynamic update: cluster-wide
Kafka 允许的最大记录批处理大小(如果启用了压缩,则经过压缩)。如果这个增大并且存在大于 0.10.2 的消费者,则必须增加消费者的获取大小,以便他们能够获取此大型的记录批处理。在最新的消息格式版本中,记录始终分组到批处理中以提高效率。在以前的消息格式版本中,未将未压缩记录分组为批处理,此限制仅适用于该案例中的单个记录。这可以针对主题级别
max.message.bytes配置来设置。metadata.log.dirtype: string
Default: null
Importance: high
Dynamic update: read-only
此配置决定了我们将集群的元数据日志放在 KRaft 模式中。如果没有设置,则元数据日志将放置到 log.dirs 的第一个日志目录中。
metadata.log.max.record.bytes.between.snapshotstype: long
Default: 20971520
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
这是在生成新快照前,日志之间的最大字节数和高水位线。
metadata.log.segment.bytestype: int
Default: 1073741824(1 gibibyte)
Valid Values: [12,…]
Importance: high
Dynamic update: read-only
单个元数据日志文件的最大大小。
metadata.log.segment.mstype: long
Default: 604800000(7 天)
Importance: high
Dynamic update: read-only
推出新元数据日志文件前的最长时间(以毫秒为单位)。
metadata.max.retention.bytestype: long
Default: -1
Importance: high
Dynamic update: read-only
在删除旧快照和日志文件前,元数据日志和快照的最大组合大小。由于在删除任何日志前必须至少存在一个快照,所以这是软限制。
metadata.max.retention.mstype: long
Default: 604800000(7 天)
Importance: high
Dynamic update: read-only
在删除元数据日志文件或快照前保留元数据日志文件或快照的毫秒数。由于在删除任何日志前必须至少存在一个快照,所以这是软限制。
min.insync.replicastype: int
Default: 1
Valid Values: [1,…]
Importance: high
Dynamic update: cluster-wide
当制作者将 acks 设为 "all"(或 "-1"),min.insync.replicas 指定必须确认写入成功的最小副本数。如果达到此最小值,则生产者将引发异常(NotEnoughReplicas 或 NotEnoughReplicasAppend)。当同时使用 min.insync.replicas 和 acks 时,您可以强制实现更大的持久保障。典型的场景是创建包含复制原因 3 的主题,将 min.insync.replicas 设置为 2,并使用"all"进行生成。这将确保,在大多数副本没有收到写入时,生产者会引发异常。
node.idtype: int
Default: -1
Importance: high
Dynamic update: read-only
与这个进程的角色关联的节点 ID 在
process.roles为非空时 play。这在 KRaft 模式中运行时需要进行配置。num.io.threadstype: int
Default: 8
Valid Values: [1,…]
Importance: high
Dynamic update: cluster-wide
服务器用于处理请求的线程数量,其中可能包括磁盘 I/O。
num.network.threadstype: int
Default: 3
Valid Values: [1,…]
Importance: high
Dynamic update: cluster-wide
服务器用于从网络接收请求并向网络发送响应的线程数量。
num.recovery.threads.per.data.dirtype: int
Default: 1
Valid Values: [1,…]
Importance: high
Dynamic update: cluster-wide
每个数据目录的线程数量,用于在启动时进行日志恢复,并在关闭时清除。
num.replica.alter.log.dirs.threadstype: int
Default: null
Importance: high
Dynamic update: read-only
可以在日志目录之间移动副本的线程数量,其中可能包括磁盘 I/O。
num.replica.fetcherstype: int
Default: 1
Importance: high
Dynamic update: cluster-wide
用于从源代理复制消息的提取器线程数。增加这个值可提高后续代理中的 I/O 并行程度。
offset.metadata.max.bytestype: int
Default: 4096(4 kibibytes)
Importance: high
Dynamic update: read-only
与偏移提交关联的元数据条目的最大大小。
offsets.commit.required.ackstype: short
Default: -1
Importance: high
Dynamic update: read-only
接受提交前所需的 acks。通常,不应覆盖默认(-1)。
offsets.commit.timeout.mstype: int
Default: 5000(5 秒)
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
偏移提交将延迟到偏移主题的所有副本都接收提交或达到此超时。这与制作者请求超时类似。
offsets.load.buffer.sizetype: int
Default: 5242880
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
当将偏移偏移加载到缓存中时,从偏移片段读取的批处理大小(如果记录太大,则被覆盖)。
offsets.retention.check.interval.mstype: long
Default: 600000 (10 分钟)
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
检查过时的偏移的频率。
offsets.retention.minutestype: int
Default: 10080
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
消费者组丢弃了其所有消费者(即为空),在放弃之前,其偏移将保留在此保留周期内。对于单机消费者(使用手动分配),在最后一次提交后加上这个保留周期后,偏移将过期。
offsets.topic.compression.codectype: int
Default: 0
Importance: high
Dynamic update: read-only
用于偏移主题的压缩代码 - 可以利用压缩来实现"atomic"提交。
offsets.topic.num.partitionstype: int
Default: 50
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
偏移提交主题的分区数量(部署后不会更改)。
offsets.topic.replication.factortype: short
Default: 3
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
偏移主题的复制因素(设置更高的功能以确保可用性)。在集群大小满足此复制因要求前,内部主题创建将失败。
offsets.topic.segment.bytestype: int
Default: 104857600(100 mebibytes)
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
偏移主题片段字节数应保持相对小,以便加快日志压缩和缓存负载。
process.rolestype: list
Default: ""
Valid Values: [broker, controller]
Importance: high
Dynamic update: read-only
此过程 play 的角色:'broker'、'controller' 或 'broker,controller'(如果两者都是)。此配置仅适用于 KRaft(Kafka Raft)模式(而不是 ZooKeeper)中的集群。对于 Zookeeper 集群保留此配置未定义或为空。
queued.max.requeststype: int
Default: 500
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
在阻塞网络线程前,data-plane 允许排队的请求数量。
replica.fetch.min.bytestype: int
Default: 1
Importance: high
Dynamic update: read-only
每个获取响应需要的最低字节。如果没有足够字节,请等待最多
replica.fetch.wait.max.ms(broker config)。replica.fetch.wait.max.mstype: int
Default: 500
Importance: high
Dynamic update: read-only
遵循方副本发布的每个获取者请求的最大等待时间。这个值应该始终小于 replica.lag.time.max.ms,以防止频繁缩小 ISR 用于低吞吐量主题。
replica.high.watermark.checkpoint.interval.mstype: long
Default: 5000(5 秒)
Importance: high
Dynamic update: read-only
高水水位线的频率被保存到磁盘。
replica.lag.time.max.mstype: long
Default: 30000 (30 秒)
Importance: high
Dynamic update: read-only
如果后续程序未发送任何抓取请求,或者尚未消耗到领导日志偏移,则领导机将从 isr 中删除后续程序。
replica.socket.receive.buffer.bytestype: int
Default: 65536(64 kibibytes)
Importance: high
Dynamic update: read-only
该套接字接收网络请求的缓冲。
replica.socket.timeout.mstype: int
Default: 30000 (30 秒)
Importance: high
Dynamic update: read-only
网络请求的套接字超时。其值应至少为 replica.fetch.wait.max.ms。
request.timeout.mstype: int
Default: 30000 (30 秒)
Importance: high
Dynamic update: read-only
配置控制客户端等待请求响应的最大时间。如果在超时前没有收到响应,客户端会在需要时重新发送请求,或者在重试耗尽时失败请求。
sasl.mechanism.controller.protocoltype: string
Default: GSSAPI
Importance: high
Dynamic update: read-only
用于与控制器通信的 SASL 机制。默认为 GSSAPI。
socket.receive.buffer.bytestype: int
Default: 102400(100 kibibytes)
Importance: high
Dynamic update: read-only
套接字的 SO_RCVBUF 缓冲。如果值为 -1,则使用 OS 默认。
socket.request.max.bytestype: int
Default: 104857600(100 mebibytes)
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
套接字请求中的最大字节数。
socket.send.buffer.bytestype: int
Default: 102400(100 kibibytes)
Importance: high
Dynamic update: read-only
套接字的 SO_SNDBUF 缓冲。如果值为 -1,则使用 OS 默认。
transaction.max.timeout.mstype: int
Default: 900000 (15 分钟)
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
事务允许的最大超时时间。如果客户端请求的事务时间超过这个值,则代理会在 InitProducerIdRequest 返回一个错误。这可防止客户端太大的超时,这可能会阻止用户读取事务中包含的主题。
transaction.state.log.load.buffer.sizetype: int
Default: 5242880
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
当将制作者 ID 和事务加载到缓存中时,从事务日志片段读取的批量大小(如果记录太大,则为soft-limit 覆盖)。
transaction.state.log.min.isrtype: int
Default: 2
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
覆盖 min.insync.replicas 配置,用于事务主题。
transaction.state.log.num.partitionstype: int
Default: 50
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
事务主题的分区数量(部署后不会更改)。
transaction.state.log.replication.factortype: short
Default: 3
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
事务主题的复制因素(设置更高的功能以确保可用性)。在集群大小满足此复制因要求前,内部主题创建将失败。
transaction.state.log.segment.bytestype: int
Default: 104857600(100 mebibytes)
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
事务主题网段字节数相对应保持小,以便加快日志压缩和缓存负载。
transactional.id.expiration.mstype: int
Default: 604800000(7 days)
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
攻击协调器将在不收到当前事务状态更新前等待其事务状态更新的时间(以防御其事务 ID)。此设置还影响制作者 ID 到期 - 发生者 ID 后在上次写入者 ID 后过期。请注意,如果因为主题的保留设置而删除制作者 ID 的最后一个写入,则制作者 ID 可能会更早过期。
unclean.leader.election.enabletype: boolean
Default: false
Importance: high
Dynamic update: cluster-wide
指明是否将 ISR 集中的副本作为最后的手段被选为领导人,即使这样做可能会导致数据丢失。
zookeeper.connecttype: string
Default: null
Importance: high
Dynamic update: read-only
指定 ZooKeeper 连接字符串,格式为
hostname:port,其中 host 和 port 是 ZooKeeper 服务器的主机和端口。当 ZooKeeper 机器停机时,要允许通过其他 ZooKeeper 节点进行连接,也可以使用主机名1:port1,hostname2:port2,hostname3:port3来指定多个主机。服务器也可以具有 ZooKeeper chroot 路径作为其 ZooKeeper 连接字符串的一部分,将其数据置于全局 ZooKeeper 命名空间中的一些路径下。例如:为/chroot/path提供 chroot 路径,您可以为连接字符串指定hostname1:port1,hostname2:port2,hostname3:port3/chroot/path。zookeeper.connection.timeout.mstype: int
Default: null
Importance: high
Dynamic update: read-only
客户端等待建立与 zookeeper 的连接的最大时间。如果没有设置,则使用 zookeeper.session.timeout.ms 值。
zookeeper.max.in.flight.requeststype: int
Default: 10
Valid Values: [1,…]
Importance: high
Dynamic update: read-only
在阻塞前,客户端将发送到 Zookeeper 的最大未确认请求数量。
zookeeper.session.timeout.mstype: int
Default: 18000(18 秒)
Importance: high
Dynamic update: read-only
zookeeper 会话超时。
zookeeper.set.acltype: boolean
Default: false
Importance: high
Dynamic update: read-only
将客户端设置为使用安全 ACL。
broker.heartbeat.interval.mstype: int
Default: 2000(2 秒)
Importance: medium
Dynamic update: read-only
代理心跳之间毫秒的时间长度。在 KRaft 模式中运行时使用。
broker.id.generation.enabletype: boolean
Default: true
Importance: medium
Dynamic update: read-only
在服务器上启用自动代理 ID 生成。启用为 reserved.broker.max.id 配置的值时,应检查。
broker.racktype: string
Default: null
Importance: medium
Dynamic update: read-only
代理的机架。这将用于 rack 感知复制,以进行容错。示例:
RACK1、us-east-1d.broker.session.timeout.mstype: int
Default: 9000(9 秒)
Importance: medium
Dynamic update: read-only
在没有心跳时,代理租期最后一次的时间长度(毫秒)。在 KRaft 模式中运行时使用。
connections.max.idle.mstype: long
Default: 600000 (10 分钟)
Importance: medium
Dynamic update: read-only
闲置连接超时:服务器套接字处理器线程关闭闲置超过此连接的连接。
connections.max.reauth.mstype: long
Default: 0
Importance: medium
Dynamic update: read-only
当明确设置为正数(默认为 0,不是正数)时,没有超过配置的值的会话生命周期将在验证时与 v2.2.0 或更高版本的客户端通信。代理将断开在会话生命周期内没有重新验证的此类连接,然后用于除 re-authentication 以外的任何目的。配置名称可以选择在小写中带有监听程序前缀和 SASL 机制名称前缀。例如,listener.name.sasl_ssl.oauthbearer.connections.max.reauth.ms=3600000。
controlled.shutdown.enabletype: boolean
Default: true
Importance: medium
Dynamic update: read-only
启用服务器的受控关闭。
controlled.shutdown.max.retriestype: int
Default: 3
Importance: medium
Dynamic update: read-only
由于多个原因,控制关闭可能会失败。这决定了在发生此类失败时的重试次数。
controlled.shutdown.retry.backoff.mstype: long
Default: 5000(5 秒)
Importance: medium
Dynamic update: read-only
在进行每次重试前,系统需要从导致之前故障的状态中恢复系统(Controller 故障切换、副本延迟等)。此配置决定了重试前要等待的时间。
controller.quorum.append.linger.mstype: int
Default: 25
Importance: medium
Dynamic update: read-only
领导时间(以毫秒为单位)等待写入累计时间,然后再将它们刷新到磁盘。
controller.quorum.request.timeout.mstype: int
Default: 2000(2 秒)
Importance: medium
Dynamic update: read-only
配置控制客户端等待请求响应的最大时间。如果在超时前没有收到响应,客户端会在需要时重新发送请求,或者在重试耗尽时失败请求。
controller.socket.timeout.mstype: int
Default: 30000 (30 秒)
Importance: medium
Dynamic update: read-only
controller-to-broker 频道的套接字超时。
default.replication.factortype: int
Default: 1
Importance: medium
Dynamic update: read-only
自动创建主题的默认复制因素。
delegation.token.expiry.time.mstype: long
Default: 86400000 (1 天)
Valid Values: [1,…]
Importance: medium
Dynamic update: read-only
在令牌需要续订前,以毫秒为单位的令牌有效时间。默认值为 1 天。
delegation.token.master.keytype: password
Default: null
Importance: medium
Dynamic update: read-only
DEPRECATED:用于 delegation.token.secret.key 的别名,应改为使用它而不是此配置。
delegation.token.max.lifetime.mstype: long
Default: 604800000(7 days)
Valid Values: [1,…]
Importance: medium
Dynamic update: read-only
令牌最长生命周期超过其无法续订的生命期。默认值为 7 天。
delegation.token.secret.keytype: password
Default: null
Importance: medium
Dynamic update: read-only
生成和验证委托令牌的机密密钥。必须在所有代理中配置相同的密钥。如果密钥未设置或设为空字符串,代理将禁用委派令牌支持。
delete.records.purgatory.purge.interval.requeststype: int
Default: 1
Importance: medium
Dynamic update: read-only
删除记录请求的清除间隔(以请求数为单位)。
fetch.max.bytestype: int
Default: 57671680(55 mebibytes)
Valid Values: [1024,…]
Importance: medium
Dynamic update: read-only
我们返回获取请求的字节数。必须至少为 1024。
fetch.purgatory.purge.interval.requeststype: int
Default: 1000
Importance: medium
Dynamic update: read-only
获取请求清除的时间间隔(以请求数为单位)。
group.initial.rebalance.delay.mstype: int
Default: 3000(3 秒)
Importance: medium
Dynamic update: read-only
组协调器将在执行第一次重新平衡前等待更多消费者加入新组的时间。较长的延迟意味着潜在的重新平衡会较小,但会增加时间,直到处理开始为止。
group.max.session.timeout.mstype: int
Default: 1800000 (30 分钟)
Importance: medium
Dynamic update: read-only
注册消费者允许的最大会话超时。超时时间较长,使消费者有更多时间在心跳间处理信息,以检测失败。
group.max.sizetype: int
Default: 2147483647
Valid Values: [1,…]
Importance: medium
Dynamic update: read-only
单个消费者组可容纳的最大消费者数量。
group.min.session.timeout.mstype: int
Default: 6000(6 秒)
Importance: medium
Dynamic update: read-only
注册消费者的最小允许会话超时。较短的超时时间会导致以更频繁的消费者心态来加快故障检测,这可能会给代理资源造成负担。
initial.broker.registration.timeout.mstype: int
Default: 60000 (1 分钟)
Importance: medium
Dynamic update: read-only
最初注册控制器仲裁时,在声明失败并退出代理进程前要等待的毫秒数。
inter.broker.listener.nametype: string
Default: null
Importance: medium
Dynamic update: read-only
用于代理间通信的监听程序名称。如果未设置,则侦听器的名称由 security.inter.broker.protocol 定义。它是设置此和 security.inter.broker.protocol 属性的错误。
inter.broker.protocol.versiontype: string
Default: 3.2-IV0
Valid Values: [0.8.0, 0.8.1, 0.8.2, 0.9.0.0 0.10.0-IV0, 0.10.0-IV1, 0.10.1-IV1, 0.10.1-IV1, 0.10.1-IV2, 0.10.2-IV0, 0.10.0-IV0 0.11.0-iv0, 0.11.0-iv1, 0.11.0-iv2, 1.0-iv0, 1.1-iv0, 2.0-iv0, 2.1-iv1, 2.1-iv1, 2.1-iv2, 2.2-iv0, 2.2-iv1, 2.3-iv0, 2.3-iv0, 2.3-iv1, 2.3-iv1, 2.4-IV0, 2.4-IV1, 2.5-IV0, 2.6-IV0, 2.7-IV00, 2.7-IV1, 2.7-IV2, 2.8-IV0, 2.8-IV1, 3.0-IV1, 3.0-IV1, 3.1-IV0, 3.2-IV00, 2.7-IV1, 2.7-IV2, 2.8-IV0, 2.8-IV1
指定将使用的 inter-broker 协议的版本。这通常会在所有代理升级到新版本后出现问题。一些有效值为: 0.8.0, 0.8.1, 0.8.1.1, 0.8.2, 0.8.2.0, 0.8.2.1, 0.9.0.0 0.9.0.1 Check ApiVersion for the full list。
log.cleaner.backoff.mstype: long
Default: 15000(15 秒)
Valid Values: [0,…]
Importance: medium
Dynamic update: cluster-wide
没有日志清理时睡眠的时间量。
log.cleaner.dedupe.buffer.sizetype: long
Default: 134217728
Importance: medium
Dynamic update: cluster-wide
用于所有清理线程的日志 deduplication 的总内存。
log.cleaner.delete.retention.mstype: long
Default: 86400000(1 天)
Importance: medium
Dynamic update: cluster-wide
为日志压缩主题保留 delete tombstone 标记的时间长度。此设置还可在消费者开始从偏移 0 开始读取的时间绑定,以确保它们获得最终阶段的有效快照(在完成扫描之前,可以收集到其他的删除操作)。
log.cleaner.enabletype: boolean
Default: true
Importance: medium
Dynamic update: read-only
启用日志清理流程,以在服务器上运行。如果使用任何包含 cleanup.policy=compact 的主题,则应启用,包括内部偏移主题。如果禁用了这些主题,则这些主题将不会被紧凑,并持续增加大小。
log.cleaner.io.buffer.load.factortype: double
Default: 0.9
Importance: medium
Dynamic update: cluster-wide
log cleaner dedupe 缓冲加载因素。重复数据删除缓冲区可以成为其百分比。更高的值将允许一次清理更多日志,但会导致更多散列冲突。
log.cleaner.io.buffer.sizetype: int
Default: 524288
Valid Values: [0,…]
Importance: medium
Dynamic update: cluster-wide
用于在所有清理线程间日志清理 I/O 缓冲区的总内存。
log.cleaner.io.max.bytes.per.secondType: double
Default: 1.7976931348623157E308
Importance: medium
Dynamic update: cluster-wide
日志清理将会被节流,以便其读写 i/o 的读取和写入 i/o 的总和平均小于这个值。
log.cleaner.max.compaction.lag.mstype: long
Default: 9223372036854775807
Importance: medium
Dynamic update: cluster-wide
在日志中,消息会保持在日志中的压缩状态的最长时间。只适用于正在压缩的日志。
log.cleaner.min.cleanable.ratiotype: double
Default: 0.5
Importance: medium
Dynamic update: cluster-wide
脏日志的最小比率是日志的总日志,以符合清理条件。如果还指定了 log.cleaner.max.compaction.lag.ms 或 log.cleaner.min.compaction.lag.ms 配置,则日志压缩器会认为日志符合紧凑值,即已达到脏的比率阈值,日志至少具有脏(不acted)记录。 或者(ii)如果日志在 log.cleaner.max.compaction.lag.ms 周期内有脏的脏(不紧凑)记录。
log.cleaner.min.compaction.lag.mstype: long
Default: 0
Importance: medium
Dynamic update: cluster-wide
日志消息在日志中保持不限定的最小时间。只适用于正在压缩的日志。
log.cleaner.threadstype: int
Default: 1
Valid Values: [0,…]
Importance: medium
Dynamic update: cluster-wide
用于日志清理的后台线程数量。
log.cleanup.policytype: list
Default: delete
Valid Values: [compact, delete]
Importance: medium
Dynamic update: cluster-wide
除保留窗口外的片段的默认清理策略。以逗号分隔的有效策略列表。有效策略为:"删除"和"compact"。
log.index.interval.bytestype: int
Default: 4096(4 kibibytes)
Valid Values: [0,…]
Importance: medium
Dynamic update: cluster-wide
我们向偏移索引中添加条目的时间间隔。
log.index.size.max.bytestype: int
Default: 10485760(10 mebibytes)
Valid Values: [4,…]
Importance: medium
Dynamic update: cluster-wide
偏移索引的最大大小,以字节为单位。
log.message.format.versiontype: string
Default: 3.0-IV1 Valid Values: [0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.10.0-IV0, 0.10.0-IV1, 0.10.1-IV1, 0.10.1-IV1, 0.10.1-IV2, 0.10.2-IV0, 0.10.0-IV0
0.11.0-iv0, 0.11.0-iv1, 0.11.0-iv2, 1.0-iv0, 1.1-iv0, 2.0-iv0, 2.1-iv1, 2.1-iv1, 2.1-iv2, 2.2-iv0, 2.2-iv1, 2.3-iv0, 2.3-iv0, 2.3-iv1, 2.3-iv1, 2.4-IV0, 2.4-IV1, 2.5-IV0, 2.6-IV0, 2.7-IV00, 2.7-IV1, 2.7-IV2, 2.8-IV0, 2.8-IV1, 3.0-IV1, 3.0-IV1, 3.1-IV0, 3.2-IV00, 2.7-IV1, 2.7-IV2, 2.8-IV0, 2.8-IV1
指定代理将用于将信息附加到日志的消息格式版本。该值应该是有效的 ApiVersion。一些示例为: 0.8.2、0.9.0.0、0.0.0,检查 ApiVersion 获取更多详情。通过设置特定的消息格式版本,用户需要验证磁盘上的所有现有信息都小于或等于指定版本。设定这个值会错误地导致具有旧版本的用户出现问题,因为它们会收到没有理解的格式的消息。
log.message.timestamp.difference.max.mstype: long
Default: 9223372036854775807
Importance: medium
Dynamic update: cluster-wide
代理收到消息和消息中指定的时间戳之间允许的最大差别。如果 log.message.timestamp.type=CreateTime,如果时间戳超过这个阈值,则会拒绝一条消息。如果 log.message.timestamp.type=LogAppendTime,则这个配置会被忽略。如果 log.retention.ms 应该不大于 log.retention.ms,以避免不必要的日志滚动。
log.message.timestamp.typetype: string
Default: CreateTime
Valid Values: [CreateTime, LogAppendTime]
Importance: medium
Dynamic update: cluster-wide
定义消息中的时间戳是消息创建时间或日志附加时间。该值应该是
CreateTime或LogAppendTime。log.preallocatetype: boolean
Default: false
Importance: medium
Dynamic update: cluster-wide
创建新片段时是否应预先分配文件?如果您在 Windows 上使用 Kafka,您可能需要将其设置为 true。
log.retention.check.interval.mstype: long
Default: 300000 (5 分钟)
Valid Values: [1,…]
Importance: medium
Dynamic update: read-only
日志清理器检查日志是否有资格删除的频率,以毫秒为单位。
max.connection.creation.ratetype: int
Default: 2147483647
Valid Values: [0,…]
Importance: medium
Dynamic update: cluster-wide
我们在任何时间允许的最大连接创建率。也可以通过为配置名称添加前缀为
listener.name.internal.max.connection.creation.rate.Broker 范围连接速率限制来配置监听程序级别的限制,而应根据应用程序要求配置监听程序限制。达到监听器或代理限制时,新的连接将会被节流,但有 inter-broker 侦听器。只有在达到监听器级别速率限制时,才会对 inter-broker 侦听程序上的连接进行节流。max.connectionstype: int
Default: 2147483647
Valid Values: [0,…]
Importance: medium
Dynamic update: cluster-wide
我们在任何时间点上允许的最大连接数。除了使用 max.connections.per.ip 配置的任何 per-ip 限制外,还会应用这个限制。也可以通过为配置名称添加前缀为
listener.name.internal.max.connections来配置监听程序级别的限制。代理范围内的限制应该根据代理容量配置,而监听器限制应根据应用程序要求进行配置。如果启用了监听器或代理限制,则阻止新连接。即使达到代理范围限制,也会允许 inter-broker 侦听程序的连接。在这种情况下,最近在另一个监听器上使用的连接将关闭。max.connections.per.iptype: int
Default: 2147483647
Valid Values: [0,…]
Importance: medium
Dynamic update: cluster-wide
来自每个 ip 地址允许的最大连接数。如果使用 max.connections.per.ip.overrides 属性配置覆盖,则可以将其设置为 0。如果达到限制,则会丢弃来自 ip 地址的新连接。
max.connections.per.ip.overridestype: string
Default: ""
Importance: medium
Dynamic update: cluster-wide
Per-ip 或 hostname 的逗号分隔列表会覆盖到默认最大连接数。例如,值为 "hostName:100,127.0.0.1:200"。
max.incremental.fetch.session.cache.slotstype: int
Default: 1000
Valid Values: [0,…]
Importance: medium
Dynamic update: read-only
我们维护的增量获取会话的最大数量。
num.partitionstype: int
Default: 1
Valid Values: [1,…]
Importance: medium
Dynamic update: read-only
每个主题的默认日志分区数量。
password.encoder.old.secrettype: password
Default: null
Importance: medium
Dynamic update: read-only
用于动态配置的编码密码的旧 secret。只有在更新 secret 时才需要。如果指定,所有动态编码的密码都会使用这个旧的 secret 进行解码,并在代理启动时使用 password.encoder.secret 重新编码。
password.encoder.secrettype: password
Default: null
Importance: medium
Dynamic update: read-only
用于为这个代理动态配置的编码密码的 secret。
principal.builder.classtype: class
Default: org.apache.kafka.common.security.authenticator.DefaultKafkaPrincipalBuilder
Importance: medium
Dynamic update: per-broker
实施 KafkaPrincipalBuilder 接口的类完全限定名称,用于构建在授权期间使用的 KafkaPrincipal 对象。如果没有定义主体构建程序,则默认行为取决于使用中的安全协议。对于 SSL 身份验证,该主体将使用
ssl.principal.mapping.rules在可分辨名称中(如果不提供客户端验证)中的规则进行派生;否则,如果不需要客户端身份验证,则主体名称为 ANONYMOUS。对于 SASL 身份验证,如果 GSSAPI 正在使用sasl.kerberos.principal.local.rules定义的规则,以及 SASL 验证 ID 用于其他机制的 SASL 验证 ID。对于 PLAINTEXT,主体将是 ANONYMOUS。producer.purgatory.purge.interval.requeststype: int
Default: 1000
Importance: medium
Dynamic update: read-only
制作者请求的清除间隔(以请求数量表示)。
queued.max.request.bytestype: long
Default: -1
Importance: medium
Dynamic update: read-only
在读取更多请求前允许的已排队字节数。
replica.fetch.backoff.mstype: int
Default: 1000(1秒)
Valid Values: [0,…]
Importance: medium
Dynamic update: read-only
发生获取分区错误时休眠的时间。
replica.fetch.max.bytestype: int
Default: 1048576(1 mebibyte)
Valid Values: [0,…]
Importance: medium
Dynamic update: read-only
尝试获取每个分区的消息的字节数。如果获取的第一个非空分区中第一个非空分区中的第一个记录大于这个值,则记录批处理将不是绝对最大值,则仍会返回记录批处理,以确保可以进行进度。代理接受的最大记录批处理大小通过
message.max.bytes(broker config)或max.message.bytes(topic 配置)定义。replica.fetch.response.max.bytestype: int
Default: 10485760(10 mebibytes)
Valid Values: [0,…]
Importance: medium
Dynamic update: read-only
整个获取响应预期的最大字节数。记录的批处理将计入批处理中,如果提取的第一个非空白分区中的第一个记录大于这个值,则记录批处理仍会返回,以确保进行进度。因此,这不是绝对最大值。代理接受的最大记录批处理大小通过
message.max.bytes(broker config)或max.message.bytes(topic 配置)定义。replica.selector.classtype: string
Default: null
Importance: medium
Dynamic update: read-only
实现 ReplicaSelector 的完全限定类名称。这供代理用来查找首选的读取副本。默认情况下,我们使用返回领导的实现。
reserved.broker.max.idtype: int
Default: 1000
Valid Values: [0,…]
Importance: medium
Dynamic update: read-only
可用于 broker.id 的最大数量。
sasl.client.callback.handler.classtype: class
Default: null
Importance: medium
Dynamic update: read-only
实现了 AuthenticateCallbackHandler 接口的 SASL 客户端回调处理器类的完全限定名称。
sasl.enabled.mechanismstype: list
Default: GSSAPI
Importance: medium
Dynamic update: per-broker
在 Kafka 服务器中启用的 SASL 机制列表。该列表可以包含任何可用的安全提供程序的机制。默认启用 GSSAPI。
sasl.jaas.configtype: password
Default: null
Importance: medium
Dynamic update: per-broker
JAAS 登录上下文参数,用于 SASL 连接,其格式由 JAAS 配置文件使用。此处 介绍了 JAAS 配置文件格式。该值格式为:
loginModuleClass controlFlag(optionName=optionValue)*;.对于代理,配置必须在小写中带有监听前缀和 SASL 机制名称前缀。例如: listener.name.sasl_ssl.scram-sha-256.sasl.jaas.config=com.example.ScramLoginModule;.sasl.kerberos.kinit.cmdtype: string
Default: /usr/bin/kinit
Importance: medium
Dynamic update: per-broker
Kerberos kinit 命令路径.
sasl.kerberos.min.time.before.relogintype: long
Default: 60000
Importance: medium
Dynamic update: per-broker
刷新尝试之间的登录线程睡眠时间。
sasl.kerberos.principal.to.local.rulestype: list
Default: DEFAULT
Importance: medium
Dynamic update: per-broker
用于从主体名称映射到短名称(通常是操作系统用户名)的规则列表。规则按照顺序评估,第一个与主体名称匹配的规则被用来将其映射到一个短名称。之后的所有规则将被忽略。默认情况下,格式为 {username}/{hostname}@{REALM} 的主体名称被映射到 {username}。有关格式的更多详情,请参阅安全 授权和 acls。请注意,如果
principal.builder.class配置提供了 KafkaPrincipalBuilder 的扩展,则此配置会被忽略。sasl.kerberos.service.nametype: string
Default: null
Importance: medium
Dynamic update: per-broker
Kafka 运行的 Kerberos 主体名称。这可以在 Kafka 的 JAAS 配置或 Kafka 配置中定义。
sasl.kerberos.ticket.renew.jittertype: double
Default: 0.05
Importance: medium
Dynamic update: per-broker
添加至续订时间的随机jitter 的百分比。
sasl.kerberos.ticket.renew.window.factortype: double
Default: 0.8
Importance: medium
Dynamic update: per-broker
登录线程将休眠,直到达到从最后刷新到 ticket 的过期时间,此时它将尝试续订票据。
sasl.login.callback.handler.classtype: class
Default: null
Importance: medium
Dynamic update: read-only
实现了 AuthenticateCallbackHandler 接口的 SASL 登录回调处理器类的完全限定名称。对于代理,登录回调处理器配置必须以监听器前缀和 SASL 机制名称作为前缀作为前缀。例如: listener.name.sasl_ssl.scram-sha-256.sasl.login.callback.handler.class=com.example.CustomScramLoginCallbackHandler。
sasl.login.classtype: class
Default: null
Importance: medium
Dynamic update: read-only
实施登录接口的类的完全限定名称。对于代理,登录配置必须在小写中带有监听前缀和 SASL 机制名称前缀。For example, listener.name.sasl_ssl.scram-sha-256.sasl.login.class=com.example.CustomScramLogin.
sasl.login.refresh.buffer.secondstype: short
Default: 300
Importance: medium
Dynamic update: per-broker
在刷新凭证时要维护的凭证前的缓冲时间(以秒为单位)。如果刷新将超过缓冲区秒数的过期时间,则刷新将移动至可维护尽可能多的缓冲区时间。如果未指定值,则使用法定值在 0 到 3600(1 小时)之间;如果没有指定值,则使用默认值 300(5 分钟)。如果值和 sasl.login.refresh.min.period.seconds,如果它们的总和超过凭证的剩余生命周期,则都会被忽略。目前仅适用于 OAUTHBEARER。
sasl.login.refresh.min.period.secondstype: short
Default: 60
Importance: medium
Dynamic update: per-broker
在刷新凭证前等待登录刷新线程所需的最小时间(以秒为单位)。合法值介于 0 到 900(15 分钟)之间;如果没有指定值,则使用默认值 60(1 分钟)。如果值和 sasl.login.refresh.buffer.seconds 都会被忽略,如果它们的总和超过凭证的剩余生命周期。目前仅适用于 OAUTHBEARER。
sasl.login.refresh.window.factortype: double
Default: 0.8
Importance: medium
Dynamic update: per-broker
登录刷新线程将休眠,直到达到指定的窗口因素为止(在达到凭证时),它将尝试刷新凭证。法律值介于 0.5(50%)到 1.0(100%)之间,如果未指定值,则使用默认值 0.8(80%)。目前仅适用于 OAUTHBEARER。
sasl.login.refresh.window.jittertype: double
Default: 0.05
Importance: medium
Dynamic update: per-broker
相对于凭证的生命周期的最大随机 jitter 量,它们被添加到登录刷新线程睡眠时间。法律值介于 0 到 0.25(25%)之间(25%),如果没有指定值,则使用默认值 0.05(5%)。目前仅适用于 OAUTHBEARER。
sasl.mechanism.inter.broker.protocoltype: string
Default: GSSAPI
Importance: medium
Dynamic update: per-broker
用于内部代理通信的 SASL 机制。默认为 GSSAPI。
sasl.oauthbearer.jwks.endpoint.urltype: string
Default: null
Importance: medium
Dynamic update: read-only
可以检索来自提供程序的 JWKS(JSON Web Key Set) 的 OAuth/OIDC 供应商 URL。URL 可以是基于 HTTP(S)或基于文件的。如果 URL 基于 HTTP(S),则 JWKS 数据将通过代理启动时配置的 URL 从 OAuth/OIDC 供应商中检索。所有 then-current 密钥将缓存在代理中,用于传入请求。如果为 JWT 收到身份验证请求,如果包含尚未在缓存中但未包括在缓存中的"kid"标头声明值,则将根据需要再次查询 JWKS 端点。但是,代理会在收到任何 JWT 请求前轮询每个 sasl.oauthbearer.jwks.endpoint.refresh.ms 毫秒的 URL 来刷新缓存。如果 URL 是基于文件,代理将从启动时配置的位置载入 JWKS 文件。如果 JWT 包含不在 JWKS 文件中的"kid"标头值,代理将拒绝 JWT 和身份验证。
sasl.oauthbearer.token.endpoint.urltype: string
Default: null
Importance: medium
Dynamic update: read-only
OAuth/OIDC 身份提供程序的 URL。如果 URL 基于 HTTP(S),则代表签发者的令牌端点 URL,请求将基于 sasl.jaas.config 中的配置进行登录。如果 URL 基于文件,它将指定包含由 OAuth/OIDC 身份提供程序发布的访问令牌(在 JWT 序列化表单中)的文件用于授权。
sasl.server.callback.handler.classtype: class
Default: null
Importance: medium
Dynamic update: read-only
实现了 AuthenticateCallbackHandler 接口的 SASL 服务器回调处理器类的完全限定名称。服务器回调处理程序必须以监听器前缀和 SASL 机制名称作为前缀(小写)。例如: listener.name.sasl_ssl.plain.sasl.server.callback.handler.class=com.example.CustomPlainCallbackHandler。
security.inter.broker.protocoltype: string
Default: PLAINTEXT
Importance: medium
Dynamic update: read-only
用于在代理之间通信的安全协议。有效值为:PLAINTEXT、SSL、SASL_PLAINTEXT、SASL_SSL.这是一个同时设置此和 inter.broker.listener.name 属性的错误。
socket.connection.setup.timeout.max.mstype: long
Default: 30000 (30 秒)
Importance: medium
Dynamic update: read-only
客户端等待套接字连接建立的最大时间。对于每个连续的连接失败,连接设置超时将按这个最大值增加。为避免连接 storms,则 0.2 的随机化工厂将应用到超时,从而导致计算值上面的 20% 到 20% 的随机范围。
socket.connection.setup.timeout.mstype: long
Default: 10000 (10 秒)
Importance: medium
Dynamic update: read-only
客户端等待套接字连接建立的时间。如果在超时前没有构建连接,客户端将关闭套接字频道。
socket.listen.backlog.sizetype: int
Default: 50
Valid Values: [1,…]
Importance: medium
Dynamic update: read-only
套接字中待处理连接的最大数量。在 Linux 中,您可能还需要配置
somaxconn和tcp_max_syn_backlog内核参数来使配置生效。ssl.cipher.suitestype: list
Default: ""
Importance: medium
Dynamic update: per-broker
密码套件列表。这是验证、加密、MAC 和密钥交换算法的命名组合,用于通过 TLS 或 SSL 网络协议协商网络连接的安全设置。默认情况下,支持所有可用的密码套件。
ssl.client.authtype: string
Default: none
Valid Values: [required, requested, none]
Importance: medium
Dynamic update: per-broker
配置 kafka 代理以请求客户端身份验证。以下设置是通用的:
-
需要
SSL.client.auth=requiredIf 设为所需的客户端身份验证。 -
SSL.client.auth=requested这意味着客户端身份验证是可选的。如果设置了这个选项,则客户端可以选择不提供对其验证信息的验证信息 -
SSL.client.auth=none意味着不需要客户端身份验证。
-
需要
ssl.enabled.protocolstype: list
Default: TLSv1.2,TLSv1.3
Importance: medium
Dynamic update: per-broker
为 SSL 连接启用的协议列表。使用 Java 11 或更新版本运行时,默认值为 'TLSv1.2,TLSv1.3',否则为 'TLSv1.2'。使用 Java 11 的默认值时,如果客户端和服务器同时支持 TLSv1.3,则客户端和服务器将首选 TLSv1.3,否则将回退到 TLSv1.2(假设这两个支持至少支持 TLSv1.2)。在大多数情况下,这个默认设置应该是正常的。另请参阅
ssl.protocol的配置文档。ssl.key.passwordtype: password
Default: null
Importance: medium
Dynamic update: per-broker
密钥存储文件或在"ssl.keystore.key"中指定的 PEM 密钥的密码。只有在配置了双向验证时,客户端才需要这样做。
ssl.keymanager.algorithmtype: string
Default: SunX509
Importance: medium
Dynamic update: per-broker
密钥管理器工厂用于 SSL 连接的算法。默认值为 Java 虚拟机配置的主要管理器工厂算法。
ssl.keystore.certificate.chaintype: password
Default: null
Importance: medium
Dynamic update: per-broker
使用由 'ssl.keystore.type" 指定的格式的证书链。默认 SSL 引擎工厂仅支持使用 X.509 证书列表的 PEM 格式。
ssl.keystore.keytype: password
Default: null
Importance: medium
Dynamic update: per-broker
使用 'ssl.keystore.type" 指定的格式的私钥。默认 SSL 引擎工厂只支持使用 PKCS#8 密钥的 PEM 格式。如果密钥已加密,则必须使用 'ssl.key.password' 指定密钥密码。
ssl.keystore.locationtype: string
Default: null
Importance: medium
Dynamic update: per-broker
密钥存储文件的位置。对于客户端,这是可选的,可用于客户端双向身份验证。
ssl.keystore.passwordtype: password
Default: null
Importance: medium
Dynamic update: per-broker
密钥存储文件的存储密码。对于客户端,这是可选的,只有在配置了 'ssl.keystore.location' 时才需要。PEM 格式不支持密钥存储密码。
ssl.keystore.typetype: string
Default: JKS
Importance: medium
Dynamic update: per-broker
密钥存储文件的文件格式。对于客户端,这是可选的。
ssl.protocoltype: string
Default: TLSv1.3
Importance: medium
Dynamic update: per-broker
用于生成 SSLContext 的 SSL 协议。使用 Java 11 或更新版本运行时,默认值为 'TLSv1.3',否则为 'TLSv1.2'。对于大多数用例来说,这个值应该非常正常。最近 JVM 中允许的值是 'TLSv1.2' 和 'TLSv1.3'。'TLS', 'TLSv1.1', 'SSL', 'SSLv2' 和 'SSLv3' 在以前的 JVM 中可能被支持,但由于已知的安全漏洞,不建议使用它们。使用这个配置和 'ssl.enabled.protocols' 的默认值,如果服务器不支持 'TLSv1.3',客户端将降级为 'TLSv1.2'。如果此配置被设置为 'TLSv1.2',则客户端不会使用 'TLSv1.3',即使它是 ssl.enabled.protocols 中的值之一,服务器仅支持 'TLSv1.3'。
ssl.providertype: string
Default: null
Importance: medium
Dynamic update: per-broker
用于 SSL 连接的安全供应商名称。默认值是 JVM 的默认安全供应商。
ssl.trustmanager.algorithmtype: string
Default: PKIX
Importance: medium
Dynamic update: per-broker
信任管理器工厂用于 SSL 连接的算法。默认值为 Java 虚拟机配置的信任管理器工厂算法。
ssl.truststore.certificatestype: password
Default: null
Importance: medium
Dynamic update: per-broker
可信证书,格式为 'ssl.truststore.type'。默认 SSL 引擎工厂仅支持使用 X.509 证书使用 PEM 格式。
ssl.truststore.locationtype: string
Default: null
Importance: medium
Dynamic update: per-broker
信任存储文件的位置。
ssl.truststore.passwordtype: password
Default: null
Importance: medium
Dynamic update: per-broker
信任存储文件的密码。如果没有设置密码,则仍然将使用配置的信任存储文件,但会禁用完整性检查。信任存储密码不支持 PEM 格式。
ssl.truststore.typetype: string
Default: JKS
Importance: medium
Dynamic update: per-broker
信任存储文件的文件格式。
zookeeper.clientCnxnSockettype: string
Default: null
Importance: medium
Dynamic update: read-only
在使用 ZooKeeper 的 TLS 连接时,通常设置为
org.apache.zookeeper.ClientCnxnSocketNetty。覆盖通过同名zookeeper.clientCnxnSocket系统属性设置的任何显式值。zookeeper.ssl.client.enabletype: boolean
Default: false
Importance: medium
Dynamic update: read-only
将客户端设置为在连接到 ZooKeeper 时使用 TLS。一个显式值会覆盖通过
zookeeper.client.secure系统属性设置的任何值(注意不同的名称)。如果未设置任何设置,则默认为 false;如果为 true,zookeeper.clientCnxnSocket必须设置为org.apache.zookeeper.ClientCnxnSocketNetty);其他要设置的值可能包括zookeeper.ssl.cipher.suites、zookeeper.ssl.crl.enable、zookeeper.ssl.crl.enable。zookeeper.ssl.enabled.protocol.protocols,zookeeper.ssl.endpoint.identification.algorithm,zookeeper.ssl.keystore.location,zookeeper.ssl.keystore.password,zookeeper.ssl.keystore.type,zookeeper.ssl.ocsp.enable, , zookeeper.ssl.keystore.zookeeper.ssl.protocol,zookeeper.ssl.truststore.location,zookeeper.ssl.truststore.password,zookeeper.ssl.truststore.type.zookeeper.ssl.keystore.locationtype: string
Default: null
Importance: medium
Dynamic update: read-only
将客户端证书与 ZooKeeper 的 TLS 连接一起使用时的密钥存储位置。覆盖通过
zookeeper.ssl.keyStore.location系统属性设置的任何显式值(请注意 camelCase)。zookeeper.ssl.keystore.passwordtype: password
Default: null
Importance: medium
Dynamic update: read-only
将客户端证书与 ZooKeeper 的 TLS 连接一起使用时,密钥存储密码。覆盖通过
zookeeper.ssl.keyStore.password系统属性设置的任何显式值(请注意 camelCase)。请注意,ZooKeeper 不支持与密钥存储密码不同的密钥密码,因此请确保将密钥存储中的密钥密码设置为与密钥存储密码相同;否则,尝试 Zookeeper 的连接将失败。zookeeper.ssl.keystore.typetype: string
Default: null
Importance: medium
Dynamic update: read-only
将客户端证书与 ZooKeeper 的 TLS 连接一起使用时,密钥存储类型。覆盖通过
zookeeper.ssl.keyStore.type系统属性设置的任何显式值(请注意 camelCase)。null默认值表示将根据密钥存储的文件名扩展名来自动检测类型。zookeeper.ssl.truststore.locationtype: string
Default: null
Importance: medium
Dynamic update: read-only
使用 TLS 连接 ZooKeeper 时的信任存储位置。覆盖通过
zookeeper.ssl.trustStore.location系统属性设置的任何显式值(请注意 camelCase)。zookeeper.ssl.truststore.passwordtype: password
Default: null
Importance: medium
Dynamic update: read-only
使用 TLS 连接到 ZooKeeper 时信任存储密码。覆盖通过
zookeeper.ssl.trustStore.password系统属性设置的任何显式值(请注意 camelCase)。zookeeper.ssl.truststore.typetype: string
Default: null
Importance: medium
Dynamic update: read-only
使用 TLS 连接 ZooKeeper 时的 truststore 类型。覆盖通过
zookeeper.ssl.trustStore.type系统属性设置的任何显式值(请注意 camelCase)。null默认值表示根据信任存储的文件名扩展自动探测 类型。alter.config.policy.class.nametype: class
Default: null
Importance: low
Dynamic update: read-only
更改配置策略类,用于验证。类应该实现
org.apache.kafka.server.policy.AlterConfigPolicy接口。alter.log.dirs.replication.quota.window.numtype: int
Default: 11
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
要在内存中保留的示例数量,用于更改日志缓存复制配额。
alter.log.dirs.replication.quota.window.size.secondstype: int
Default: 1
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
用于更改日志缓存复制配额的每个示例的时间范围。
authorizer.class.nametype: string
Default: ""
Importance: low
Dynamic update: read-only
实现
org.apache.kafka.server.authorizer.Authorizer接口的类的完全限定名称,代理将用于授权。client.quota.callback.classtype: class
Default: null
Importance: low
Dynamic update: read-only
实施 ClientQuotaCallback 接口的类的完全限定名称,用于决定应用到客户端请求的配额限制。默认情况下,使用 <user>、<client-id>、<user> 或 <client-id> 配额保存在 ZooKeeper 中。对于任何给定请求,与会话的用户主体匹配的最具体配额,并应用请求的 client-id。
connection.failed.authentication.delay.mstype: int
Default: 100
Valid Values: [0,…]
Importance: low
Dynamic update: read-only
在身份验证失败时关闭连接延迟:这是连接关闭的时间(以毫秒为单位),在身份验证失败时会延迟连接。这必须配置为小于 connection.max.idle.ms,以防止连接超时。
controller.quorum.retry.backoff.mstype: int
Default: 20
Importance: low
Dynamic update: read-only
尝试重试失败的请求到给定主题分区前等待的时间。这可避免在某些故障情况下在紧密循环中重复发送请求。
controller.quota.window.numtype: int
Default: 11
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
为控制器修改配额保留的内存中的示例数量。
controller.quota.window.size.secondstype: int
Default: 1
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
控制器变异配额的每个示例的时间范围。
create.topic.policy.class.nametype: class
Default: null
Importance: low
Dynamic update: read-only
创建用于验证的主题策略类。该类应当实施
org.apache.kafka.server.policy.CreateTopicPolicy接口。delegation.token.expiry.check.interval.mstype: long
Default: 3600000(1 小时)
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
扫描间隔,以删除已过期的委托令牌。
kafka.metrics.polling.interval.secstype: int
Default: 10
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
指标轮询间隔(以秒为单位)可用于 kafka.metrics.reporters 实现。
kafka.metrics.reporterstype: list
Default: ""
Importance: low
Dynamic update: read-only
用作 Yammer 指标定制报告器的类列表。报告器应该实现
kafka.metrics.KafkaMetricsReporter特征。如果客户端想要在自定义报告器上公开 JMX 操作,则自定义报告器还需要额外实现扩展kafka.metrics.KafkaMetricsReporterMBean特征的 MBean 特征,以便注册的 MBean 约定符合标准 MBean 规范。listener.security.protocol.mapDescription: string
Default: PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
Importance: low
Dynamic update: per-broker
在侦听器名称和安全协议之间映射。这必须为相同的安全协议定义,才能在多个端口或 IP 中使用。例如,即使同时需要 SSL,也可以分隔内部和外部流量。以后,用户可以用名称 INTERNAL 和 EXTERNAL 定义监听器:INTERNAL
:SSL,EXTERNAL:SSL。如上所示,键和值用冒号隔开,映射条目用逗号分开。每个监听器名称应只在映射中出现一次。可以通过将规范化前缀(小写)名添加到配置名称,为每个监听程序配置不同的安全(SSL 和 SASL)设置。例如,若要为 INTERNAL 侦听器设置不同的密钥存储,将设置具有名称listener.name.internal.ssl.keystore.location的配置。如果没有设置监听程序名称的配置,则配置将回退到通用配置(如ssl.keystore.location)。请注意,如果不提供显式映射并且不使用其他安全协议,则假定在 KRaft 是从controller.listener.names到 PLAINTEXT 定义的监听程序名称的默认映射。log.message.downconversion.enabletype: boolean
Default: true
Importance: low
Dynamic update: cluster-wide
此配置控制是否启用了 down-conversion 的消息格式来满足请求量。当设置为
false时,代理将不会为希望旧消息格式的用户执行 down-conversion。代理以UNSUPPORTED_VERSION错误响应,以消耗来自此类老客户端的请求。此配置不适用于复制器可能需要的任何消息格式转换。metric.reporterstype: list
Default: ""
Importance: low
Dynamic update: cluster-wide
用作指标报告器的类列表。实施
org.apache.kafka.common.metrics.MetricsReporter接口允许在新指标创建通知的类中插入。JmxReporter 始终包含在内以注册 JMX 统计。metrics.num.samplestype: int
Default: 2
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
为计算指标维护的示例数量。
metrics.recording.leveltype: string
Default: INFO
Importance: low
Dynamic update: read-only
指标的最高记录级别。
metrics.sample.window.mstype: long
Default: 30000 (30 秒)
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
计算指标示例的时间窗口。
password.encoder.cipher.algorithmtype: string
Default: AES/CBC/PKCS5Padding
Importance: low
Dynamic update: read-only
用于动态配置的密码的 Cipher 算法。
password.encoder.iterationstype: int
Default: 4096
Valid Values: [1024,…]
Importance: low
Dynamic update: read-only
用于动态配置的编码密码的迭代计数。
password.encoder.key.lengthtype: int
Default: 128
Valid Values: [8,…]
Importance: low
Dynamic update: read-only
用于动态配置的密码的编码密钥长度。
password.encoder.keyfactory.algorithmtype: string
Default: null
Importance: low
Dynamic update: read-only
用于动态配置的密码的 SecretKeyonnectionFactoryy 算法。默认为 PBKDF2WithHmacSHA512(如果可用),否则为 PBKDF2WithHmacSHA1。
quota.window.numtype: int
Default: 11
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
在内存中为客户端配额保留的示例数量。
quota.window.size.secondstype: int
Default: 1
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
客户端配额的每个样本的时间范围。
replication.quota.window.numtype: int
Default: 11
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
在内存中保留复制配额的示例数量。
replication.quota.window.size.secondstype: int
Default: 1
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
复制配额的每个示例的时间范围。
sasl.login.connect.timeout.mstype: int
Default: null
Importance: low
Dynamic update: read-only
(可选)外部身份验证供应商连接超时的值(以毫秒为单位)。目前仅适用于 OAUTHBEARER。
sasl.login.read.timeout.mstype: int
Default: null
Importance: low
Dynamic update: read-only
(可选)外部身份验证提供程序读取超时的值(以毫秒为单位)。目前仅适用于 OAUTHBEARER。
sasl.login.retry.backoff.max.mstype: long
Default: 10000 (10 秒)
Importance: low
Dynamic update: read-only
(可选)登录尝试外部身份验证提供程序之间等待的最长这个值(可选)值(以毫秒为单位)。登录使用 sasl.login.retry.backoff.ms 设置的初始等待算法,并在尝试为 sasl.login.retry.backoff.max.ms 设置指定的最大等待长度之间加倍长度。目前仅适用于 OAUTHBEARER。
sasl.login.retry.backoff.mstype: long
Default: 100
Importance: low
Dynamic update: read-only
(可选)在登录尝试外部身份验证提供程序之间初始等待的值(可选)值(以毫秒为单位)。登录使用 sasl.login.retry.backoff.ms 设置的初始等待算法,并在尝试为 sasl.login.retry.backoff.max.ms 设置指定的最大等待长度之间加倍长度。目前仅适用于 OAUTHBEARER。
sasl.oauthbearer.clock.skew.secondstype: int
Default: 30
Importance: low
Dynamic update: read-only
(可选)值,允许 OAuth/OIDC 身份提供程序和代理的时间不同。
sasl.oauthbearer.expected.audiencetype: list
Default: null
Importance: low
Dynamic update: read-only
(可选)代理的逗号分隔设置,用于验证已经为其中一个预期对象发布 JWT。为标准的 OAuth "aud" 声明将检查 JWT,如果设置了这个值,代理将匹配 JWT 的"aud"声明的值,以查看是否存在准确的匹配项。如果没有匹配项,代理将拒绝 JWT 和身份验证。
sasl.oauthbearer.expected.issuertype: string
Default: null
Importance: low
Dynamic update: read-only
(可选)用于验证 JWT 是由预期签发者创建的代理的设置。将检查标准的 OAuth "iss" 声明,如果设置了此值,代理就与 JWT 的"iss"声明中的内容完全匹配。如果没有匹配项,代理将拒绝 JWT 和身份验证。
sasl.oauthbearer.jwks.endpoint.refresh.mstype: long
Default: 3600000(1 小时)
Importance: low
Dynamic update: read-only
(可选)代理在刷新其 JWKS(JSON Web Key Set)缓存时要等待的值,其中包含用于验证 JWT 签名的密钥。
sasl.oauthbearer.jwks.endpoint.retry.backoff.max.mstype: long
Default: 10000 (10 秒)
Importance: low
Dynamic update: read-only
(可选)尝试从外部身份验证提供程序检索 JWKS(JSON Web Key Set)之间的最大等待的值(以毫秒为单位)。JWKS 检索使用基于 sasl.oauthbearer.jwks.endpoint.retry.max.ms 设置的初始等待长度的指数级 backoff 算法,并在 sasl.oauthbearer.jwks.max.ms 设置指定的最大等待时间。
sasl.oauthbearer.jwks.endpoint.retry.backoff.mstype: long
Default: 100
Importance: low
Dynamic update: read-only
(可选)初始等待的值(JSON Web Key Set)从外部身份验证提供程序检索尝试。JWKS 检索使用基于 sasl.oauthbearer.jwks.endpoint.retry.max.ms 设置的初始等待长度的指数级 backoff 算法,并在 sasl.oauthbearer.jwks.max.ms 设置指定的最大等待时间。
sasl.oauthbearer.scope.claim.nametype: string
Default: scope
Importance: low
Dynamic update: read-only
范围的 OAuth 声明通常命名为"scope",但此(可选)设置可以提供用于 JWT 有效负载声明中包含的范围的不同名称,如果 OAuth/OIDC 供应商将该声明使用不同的名称。
sasl.oauthbearer.sub.claim.nametype: string
Default: sub
Importance: low
Dynamic update: read-only
主体的 OAuth 声明通常命名为"sub",但此(可选)设置可以为 JWT 有效负载声明中包含的主题提供不同的名称,如果 OAuth/OIDC 供应商将该声明使用不同的名称。
security.providerstype: string
Default: null
Importance: low
Dynamic update: read-only
每次返回供应商实施安全算法的可配置创建者类列表。这些类应当实施
org.apache.kafka.common.security.auth.SecurityProviderCreator接口。ssl.endpoint.identification.algorithmtype: string
Default: https
Importance: low
Dynamic update: per-broker
使用服务器证书验证服务器主机名的端点标识算法。
ssl.engine.factory.classtype: class
Default: null
Importance: low
Dynamic update: per-broker
类型为 org.apache.kafka.common.security.auth.SslEngineFactory 的类来提供 SSLEngine 对象。默认值为 org.apache.kafka.common.ssl.DefaultSslEngineFactory。
ssl.principal.mapping.rulestype: string
Default: DEFAULT
Importance: low
Dynamic update: read-only
用于映射的规则列表与客户端证书区分名称到短名称。规则按照顺序评估,第一个与主体名称匹配的规则被用来将其映射到一个短名称。之后的所有规则将被忽略。默认情况下,区分 X.500 证书的名称将是主体。有关格式的更多详情,请参阅安全 授权和 acls。请注意,如果
principal.builder.class配置提供了 KafkaPrincipalBuilder 的扩展,则此配置会被忽略。ssl.secure.random.implementationtype: string
Default: null
Importance: low
Dynamic update: per-broker
用于 SSL 加密操作的 SecureRandom PRNG 实施。
transaction.abort.timed.out.transaction.cleanup.interval.mstype: int
Default: 10000 (10 秒)
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
恢复已超时的事务的时间间隔。
transaction.remove.expired.transaction.cleanup.interval.mstype: int
Default: 3600000(1 小时)
Valid Values: [1,…]
Importance: low
Dynamic update: read-only
移除由于 transaction.
id.expiration.ms所经过的事务所过期的时间间隔。zookeeper.ssl.cipher.suitestype: list
Default: null
Importance: low
Dynamic update: read-only
指定在 ZooKeeper TLS 协商(csv)中使用的启用的密码套件。覆盖通过
zookeeper.ssl.ciphersuites系统属性设置的任何显式值(注意单个单词"ciphersuites")。null默认值表示启用的密码套件列表由所使用的 Java 运行时决定。zookeeper.ssl.crl.enabletype: boolean
Default: false
Importance: low
Dynamic update: read-only
指定是否在 ZooKeeper TLS 协议中启用证书撤销列表。覆盖通过
zookeeper.ssl.crl系统属性设置的任何显式值(请注意较短的名称)。zookeeper.ssl.enabled.protocolstype: list
Default: null
Importance: low
Dynamic update: read-only
指定 ZooKeeper TLS 协商(csv)中的已启用的协议。覆盖通过
zookeeper.ssl.enabledProtocols系统属性设置的任何显式值(请注意 camelCase)。默认值null表示启用的协议将是zookeeper.ssl.protocol配置属性值。zookeeper.ssl.endpoint.identification.algorithmtype: string
Default: HTTPS
Importance: low
Dynamic update: read-only
指定是否在 ZooKeeper TLS 协商过程中启用主机名验证,同时(不区分大小写)"https"表示启用了 ZooKeeper 主机名验证,并明确的空白值表示禁用(禁止测试目的)。一个显式值会覆盖通过
zookeeper.ssl.hostnameVerification系统属性设置的任何 "true" 或 "false" 值(注意不同的名称和值;true 表示 https 和 false 表示空白)。zookeeper.ssl.ocsp.enabletype: boolean
Default: false
Importance: low
Dynamic update: read-only
指定是否在 ZooKeeper TLS 协议中启用在线证书状态协议。覆盖通过
zookeeper.ssl.ocsp系统属性设置的任何显式值(请注意较短的名称)。zookeeper.ssl.protocoltype: string
Default: TLSv1.2
Importance: low
Dynamic update: read-only
指定 ZooKeeper TLS 协商中使用的协议。一个显式值会覆盖通过相同名为
zookeeper.ssl.protocol系统属性设置的任何值。