kafka配置文件详解:consumer.properties

本文详细解析了Kafka消费者配置文件consumer.properties,包括zookeeper.connect、group.id等关键参数,对于理解Kafka消费者工作原理及优化配置至关重要。
摘要由CSDN通过智能技术生成

consumer作为kafak核心组件之一,学习和分析它是很有必要的。consumer配置文件在kafak的config目录下,配置好它

在以后的学习和工作中都可以起到事半功倍的效果。


# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at

#    http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# see kafka.consumer.ConsumerConfig for more details


# Zookeeper connection string
# comma separated host:port pairs, each corresponding to a zk
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002"

#(必需)zookeeper连接服务器地址(集群可写多个)
zookeeper.connect=127.0.0.1:2181



# timeout in ms for connecting to zookeeper

#zookeeper的session的过期时间
zookeeper.connection.timeout.ms=6000


#指定多久消费者更新offset到zookeeper中

zookeeper.sync.time.ms=2000 



#consumer group id

#(必需)consumer组id
group.id=
test-consumer-group

#consumer timeout
#消费者超时
#consumer.timeout.ms=5000



#自动向zookeeper提交offset信息

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值