快速部署kafka

 

本文使用kafka的版本为1.0.0

 

一、配置文件

 

############################# Server Basics #############################

broker.id=0

 

############################# Socket Server Settings #############################

listeners=PLAINTEXT://127.0.0.1:9092

 

# 响应请求的线程数

num.network.threads=3   

 

# IO线程数

num.io.threads=8

 

#send buff

socket.send.buffer.bytes=102400

 

# The receive buffer (SO_RCVBUF) used by the socket server

socket.receive.buffer.bytes=102400

 

# The maximum size of a request that the socket server will accept (protection against OOM)

socket.request.max.bytes=104857600

 

############################# Log Basics #############################

# A comma seperated list of directories under which to store log files

log.dirs=/usr/local/var/lib/kafka-logs

 

# 每个topic默认的partition的数量,越多效率越高

num.partitions=24  

 

# 备份和恢复数据时的线程数,推荐与数据目录数一致

num.recovery.threads.per.data.dir=1

 

############################# Internal Topic Settings  #############################

#replication数 备份数

offsets.topic.replication.factor=3

transaction.state.log.replication.factor=3

transaction.state.log.min.isr=1

 

############################# Log Flush Policy #############################

# flush消息的条数阈值

log.flush.interval.messages=10000

 

# flush消息的时间阈值,与条数阈值同时生效

log.flush.interval.ms=1000

 

############################# Log Retention Policy 【log保留策略】 #############################

# The minimum age of a log file to be eligible for deletion due to age

log.retention.hours=168

 

# A size-based retention policy for logs. Segments are pruned from the log unless the remaining

# segments drop below log.retention.bytes. Functions independently of log.retention.hours.

#log.retention.bytes=1073741824

 

# The maximum size of a log segment file. When this size is reached a new log segment will be created.

log.segment.bytes=1073741824

 

# The interval at which log segments are checked to see if they can be deleted according

# to the retention policies

log.retention.check.interval.ms=300000

 

############################# Zookeeper #############################

zookeeper.connect=localhost:2181

zookeeper.connection.timeout.ms=6000

 

############################# Group Coordinator Settings #############################

# The following configuration specifies the time, in milliseconds, that the GroupCoordinator will delay the initial consumer rebalance.

# The rebalance will be further delayed by the value of group.initial.rebalance.delay.ms as new members join the group, up to a maximum of max.poll.interval.ms.

# The default value for this is 3 seconds.

# We override this to 0 here as it makes for a better out-of-the-box experience for development and testing.

# However, in production environments the default value of 3 seconds is more suitable as this will help to avoid unnecessary, and potentially expensive, rebalances during application startup.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值