Class FetchConfig
java.lang.Object
org.apache.kafka.clients.consumer.internals.FetchConfig
FetchConfig represents the static configuration for fetching records from Kafka. It is simply a way
to bundle the immutable settings that were presented at the time the Consumer was created for later use by
classes like Fetcher, CompletedFetch, etc.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanfinal Stringfinal intfinal org.apache.kafka.common.IsolationLevelfinal intfinal intfinal intfinal int -
Constructor Summary
ConstructorsConstructorDescriptionFetchConfig(int minBytes, int maxBytes, int maxWaitMs, int fetchSize, int maxPollRecords, boolean checkCrcs, String clientRackId, org.apache.kafka.common.IsolationLevel isolationLevel) Constructs a newFetchConfigusing explicitly provided values.FetchConfig(ConsumerConfig config) Constructs a newFetchConfigusing values from the givenconsumer configurationsettings:minBytes:ConsumerConfig.FETCH_MIN_BYTES_CONFIGmaxBytes:ConsumerConfig.FETCH_MAX_BYTES_CONFIGmaxWaitMs:ConsumerConfig.FETCH_MAX_WAIT_MS_CONFIGfetchSize:ConsumerConfig.MAX_PARTITION_FETCH_BYTES_CONFIGmaxPollRecords:ConsumerConfig.MAX_POLL_RECORDS_CONFIGcheckCrcs:ConsumerConfig.CHECK_CRCS_CONFIGclientRackId:ConsumerConfig.CLIENT_RACK_CONFIGisolationLevel:ConsumerConfig.ISOLATION_LEVEL_CONFIG -
Method Summary
-
Field Details
-
minBytes
public final int minBytes -
maxBytes
public final int maxBytes -
maxWaitMs
public final int maxWaitMs -
fetchSize
public final int fetchSize -
maxPollRecords
public final int maxPollRecords -
checkCrcs
public final boolean checkCrcs -
clientRackId
-
isolationLevel
public final org.apache.kafka.common.IsolationLevel isolationLevel
-
-
Constructor Details
-
FetchConfig
public FetchConfig(int minBytes, int maxBytes, int maxWaitMs, int fetchSize, int maxPollRecords, boolean checkCrcs, String clientRackId, org.apache.kafka.common.IsolationLevel isolationLevel) Constructs a newFetchConfigusing explicitly provided values. This is provided here for tests that want to exercise different scenarios can construct specific configuration values rather than going through the hassle of constructing aConsumerConfig. -
FetchConfig
Constructs a newFetchConfigusing values from the givenconsumer configurationsettings:minBytes:ConsumerConfig.FETCH_MIN_BYTES_CONFIGmaxBytes:ConsumerConfig.FETCH_MAX_BYTES_CONFIGmaxWaitMs:ConsumerConfig.FETCH_MAX_WAIT_MS_CONFIGfetchSize:ConsumerConfig.MAX_PARTITION_FETCH_BYTES_CONFIGmaxPollRecords:ConsumerConfig.MAX_POLL_RECORDS_CONFIGcheckCrcs:ConsumerConfig.CHECK_CRCS_CONFIGclientRackId:ConsumerConfig.CLIENT_RACK_CONFIGisolationLevel:ConsumerConfig.ISOLATION_LEVEL_CONFIG
- Parameters:
config- Consumer configuration
-
-
Method Details