pub struct FetchRequest {
pub replica_id: Int32,
pub max_wait_ms: Int32,
pub min_bytes: Int32,
pub max_bytes: Option<Int32>,
pub isolation_level: Option<IsolationLevel>,
pub topics: Vec<FetchRequestTopic>,
}Fields§
§replica_id: Int32The broker ID of the follower, of -1 if this request is from a consumer.
max_wait_ms: Int32The maximum time in milliseconds to wait for the response.
min_bytes: Int32The minimum bytes to accumulate in the response.
max_bytes: Option<Int32>The maximum bytes to fetch. See KIP-74 for cases where this limit may not be honored.
Defaults to “no limit / max”.
Added in version 3.
isolation_level: Option<IsolationLevel>This setting controls the visibility of transactional records.
Using READ_UNCOMMITTED (isolation_level = 0) makes all records visible. With READ_COMMITTED
(isolation_level = 1), non-transactional and COMMITTED transactional records are visible. To be more
concrete, READ_COMMITTED returns all data from offsets smaller than the current LSO (last stable offset), and
enables the inclusion of the list of aborted transactions in the result, which allows consumers to discard
ABORTED transactional records.
As per KIP-98 the default is READ_UNCOMMITTED.
Added in version 4.
topics: Vec<FetchRequestTopic>The topics to fetch.
Trait Implementations§
Source§impl Debug for FetchRequest
impl Debug for FetchRequest
Source§impl RequestBody for FetchRequest
impl RequestBody for FetchRequest
Source§const API_VERSION_RANGE: ApiVersionRange
const API_VERSION_RANGE: ApiVersionRange
That’s enough for now.
Note that we do not support fetch request prior to version 4, since this is the version when message version 2 was introduced (KIP-98).
Source§const FIRST_TAGGED_FIELD_IN_REQUEST_VERSION: ApiVersion
const FIRST_TAGGED_FIELD_IN_REQUEST_VERSION: ApiVersion
Source§type ResponseBody = FetchResponse
type ResponseBody = FetchResponse
Source§const FIRST_TAGGED_FIELD_IN_RESPONSE_VERSION: ApiVersion = Self::FIRST_TAGGED_FIELD_IN_REQUEST_VERSION
const FIRST_TAGGED_FIELD_IN_RESPONSE_VERSION: ApiVersion = Self::FIRST_TAGGED_FIELD_IN_REQUEST_VERSION
FIRST_TAGGED_FIELD_IN_REQUEST_VERSION but
there are some special snowflakes.