diff --git a/core/src/main/scala/kafka/server/KafkaConfig.scala b/core/src/main/scala/kafka/server/KafkaConfig.scala index a64b210..1c3bfdd 100644 --- a/core/src/main/scala/kafka/server/KafkaConfig.scala +++ b/core/src/main/scala/kafka/server/KafkaConfig.scala @@ -198,7 +198,7 @@ class KafkaConfig private (val props: VerifiableProperties) extends ZKConfig(pro val replicaSocketReceiveBufferBytes = props.getInt(ReplicaSocketReceiveBufferBytesProp, ConsumerConfig.SocketBufferSize) /* the number of byes of messages to attempt to fetch */ - val replicaFetchMaxBytes = props.getInt(ReplicaFetchMaxBytesProp, ConsumerConfig.FetchSize) + val replicaFetchMaxBytes = props.getIntInRange(ReplicaFetchMaxBytesProp, ConsumerConfig.FetchSize, (messageMaxBytes, Int.MaxValue)) /* max wait time for each fetcher request issued by follower replicas*/ val replicaFetchWaitMaxMs = props.getInt(ReplicaFetchWaitMaxMsProp, 500)