Struct kafka_protocol::messages::fetch_request::FetchRequestBuilder
source · pub struct FetchRequestBuilder { /* private fields */ }
Expand description
Builder for FetchRequest
.
Implementations§
source§impl FetchRequestBuilder
impl FetchRequestBuilder
sourcepub fn cluster_id(&mut self, value: Option<StrBytes>) -> &mut Self
pub fn cluster_id(&mut self, value: Option<StrBytes>) -> &mut Self
The clusterId if known. This is used to validate metadata fetches prior to broker registration.
Supported API versions: 12-16
sourcepub fn replica_id(&mut self, value: BrokerId) -> &mut Self
pub fn replica_id(&mut self, value: BrokerId) -> &mut Self
The broker ID of the follower, of -1 if this request is from a consumer.
Supported API versions: 0-14
sourcepub fn replica_state(&mut self, value: ReplicaState) -> &mut Self
pub fn replica_state(&mut self, value: ReplicaState) -> &mut Self
Supported API versions: 15-16
sourcepub fn max_wait_ms(&mut self, value: i32) -> &mut Self
pub fn max_wait_ms(&mut self, value: i32) -> &mut Self
The maximum time in milliseconds to wait for the response.
Supported API versions: 0-16
sourcepub fn min_bytes(&mut self, value: i32) -> &mut Self
pub fn min_bytes(&mut self, value: i32) -> &mut Self
The minimum bytes to accumulate in the response.
Supported API versions: 0-16
sourcepub fn max_bytes(&mut self, value: i32) -> &mut Self
pub fn max_bytes(&mut self, value: i32) -> &mut Self
The maximum bytes to fetch. See KIP-74 for cases where this limit may not be honored.
Supported API versions: 3-16
sourcepub fn isolation_level(&mut self, value: i8) -> &mut Self
pub fn isolation_level(&mut self, value: i8) -> &mut Self
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
Supported API versions: 4-16
sourcepub fn session_id(&mut self, value: i32) -> &mut Self
pub fn session_id(&mut self, value: i32) -> &mut Self
The fetch session ID.
Supported API versions: 7-16
sourcepub fn session_epoch(&mut self, value: i32) -> &mut Self
pub fn session_epoch(&mut self, value: i32) -> &mut Self
The fetch session epoch, which is used for ordering requests in a session.
Supported API versions: 7-16
sourcepub fn topics(&mut self, value: Vec<FetchTopic>) -> &mut Self
pub fn topics(&mut self, value: Vec<FetchTopic>) -> &mut Self
The topics to fetch.
Supported API versions: 0-16
sourcepub fn forgotten_topics_data(&mut self, value: Vec<ForgottenTopic>) -> &mut Self
pub fn forgotten_topics_data(&mut self, value: Vec<ForgottenTopic>) -> &mut Self
In an incremental fetch request, the partitions to remove.
Supported API versions: 7-16
sourcepub fn rack_id(&mut self, value: StrBytes) -> &mut Self
pub fn rack_id(&mut self, value: StrBytes) -> &mut Self
Rack ID of the consumer making this request
Supported API versions: 11-16
sourcepub fn unknown_tagged_fields(
&mut self,
value: BTreeMap<i32, Bytes>
) -> &mut Self
pub fn unknown_tagged_fields( &mut self, value: BTreeMap<i32, Bytes> ) -> &mut Self
Other tagged fields
sourcepub fn build(&self) -> Result<FetchRequest, FetchRequestBuilderError>
pub fn build(&self) -> Result<FetchRequest, FetchRequestBuilderError>
Trait Implementations§
source§impl Clone for FetchRequestBuilder
impl Clone for FetchRequestBuilder
source§fn clone(&self) -> FetchRequestBuilder
fn clone(&self) -> FetchRequestBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more