kafka中topic默认属性_聊聊kafka0.8的consumer超时时间属性

序本文主要研究一下kafka的consumer.timeout.ms属性。consumer的属性值kafka_2.10-0.8.2.2-sources.jar!/kafka/consumer/ConsumerConfig.scala/** a string that uniquely identifies a set of consumers within the same consumer gr...
摘要由CSDN通过智能技术生成

本文主要研究一下kafka的consumer.timeout.ms属性。

consumer的属性值

kafka_2.10-0.8.2.2-sources.jar!/kafka/consumer/ConsumerConfig.scala

/** a string that uniquely identifies a set of consumers within the same consumer group */

val groupId = props.getString("group.id")

/** consumer id: generated automatically if not set.

* Set this explicitly for only testing purpose. */

val consumerId: Option[String] = Option(props.getString("consumer.id", null))

/** the socket timeout for network requests. Its value should be at least fetch.wait.max.ms. */

val socketTimeoutMs = props.getInt("socket.timeout.ms", SocketTimeout)

require(fetchWaitMaxMs <= socketTimeoutMs, "socket.timeout.ms should always be at least fetch.wait.max.ms" +

" to prevent unnecessary socket timeouts")

/** the socket receive buffer for network requests */

val socketReceiveBufferBytes = props.getInt("socket.receive.buffer.bytes", SocketBufferSize)

/** the number of byes of messages to attempt to fetch */

val fetchMessageMaxBytes = props.getInt("fetch.message.max.bytes", FetchSize)

/** the number threads used to fetch data */

val numConsumerFetchers = props.getInt("num.consumer.fetchers", NumConsumerFetchers)

/** if true, periodically commit to zookeeper the offset of messages already fetched by the consumer */

val autoCommitEnable = props.getBoolean("auto.commit.enable", AutoCommit)

/** the frequency in ms that the consumer offsets are committed to zookeeper */

val autoCommitIntervalMs = props.getInt("auto.commit.interval.ms", AutoCommitInterval)

/** max number of message chunks buffered for consumption, each chunk can be up to fetch.message.max.bytes*/

val queuedMaxMessages = props.getInt("queued.max.message.chunks", MaxQueuedChunks)

/** max number of retries during rebalance */

val rebalanceMaxRetries = props.getInt("rebalance.max.retries", MaxRebalanceRetries)

/** the minimum amount of data the server should return for a fetch request. If insufficient data is available the request will block */

val fetchMinBytes = props.getInt("fetch.min.bytes", MinFetchBytes)

/** the maximum amount of time the server will block before answering the fetch request if there isn't sufficient data to immediately satisfy fetch.min.bytes */

val fetchWaitMaxMs = props.getInt("fetch.wait.max.ms", MaxFetchWaitMs)

/** backoff time between retries during rebalance */

val rebalanceBackoffMs = props.getInt("rebalance.backoff.ms", zkSyncTimeMs)

/** backoff time to refresh the leader of a partition after it loses the current leader */

val refreshLeaderBackoffMs = props.getInt("refresh.leader.backoff.ms", RefreshMetadataBackoffMs)

/** backoff time to reconnect the offsets channel or to retry offset fetches/commits */

val offsetsChannelBackoffMs = props.getInt("offsets.channel.backoff.ms", OffsetsChannelBackoffMs)

/** socket timeout to use when reading responses for Offset Fetch/Commit requests. This timeout will also be used for

* the ConsumerMetdata requests that are used to query for the offset coordinator. */

val offsetsChannelSocketTimeoutMs = props.getInt("offsets.channel.socket.timeout.ms", OffsetsChannelSocketTimeoutMs)

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值