#[non_exhaustive]pub struct ProduceRequest {
pub transactional_id: Option<TransactionalId>,
pub acks: i16,
pub timeout_ms: i32,
pub topic_data: Vec<TopicProduceData>,
pub unknown_tagged_fields: BTreeMap<i32, Bytes>,
}
Expand description
Valid versions: 0-11
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.transactional_id: Option<TransactionalId>
The transactional ID, or null if the producer is not transactional.
Supported API versions: 3-11
acks: i16
The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments, 1 for only the leader and -1 for the full ISR.
Supported API versions: 0-11
timeout_ms: i32
The timeout to await a response in milliseconds.
Supported API versions: 0-11
topic_data: Vec<TopicProduceData>
Each topic to produce to.
Supported API versions: 0-11
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl ProduceRequest
impl ProduceRequest
Sourcepub fn with_transactional_id(self, value: Option<TransactionalId>) -> Self
pub fn with_transactional_id(self, value: Option<TransactionalId>) -> Self
Sets transactional_id
to the passed value.
The transactional ID, or null if the producer is not transactional.
Supported API versions: 3-11
Sourcepub fn with_acks(self, value: i16) -> Self
pub fn with_acks(self, value: i16) -> Self
Sets acks
to the passed value.
The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments, 1 for only the leader and -1 for the full ISR.
Supported API versions: 0-11
Sourcepub fn with_timeout_ms(self, value: i32) -> Self
pub fn with_timeout_ms(self, value: i32) -> Self
Sets timeout_ms
to the passed value.
The timeout to await a response in milliseconds.
Supported API versions: 0-11
Sourcepub fn with_topic_data(self, value: Vec<TopicProduceData>) -> Self
pub fn with_topic_data(self, value: Vec<TopicProduceData>) -> Self
Sets topic_data
to the passed value.
Each topic to produce to.
Supported API versions: 0-11
Sourcepub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
pub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
Sets unknown_tagged_fields to the passed value.
Sourcepub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
pub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
Inserts an entry into unknown_tagged_fields.
Trait Implementations§
Source§impl Clone for ProduceRequest
impl Clone for ProduceRequest
Source§fn clone(&self) -> ProduceRequest
fn clone(&self) -> ProduceRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ProduceRequest
impl Debug for ProduceRequest
Source§impl Decodable for ProduceRequest
Available on crate feature broker
only.
impl Decodable for ProduceRequest
broker
only.Source§impl Default for ProduceRequest
impl Default for ProduceRequest
Source§impl Encodable for ProduceRequest
Available on crate feature client
only.
impl Encodable for ProduceRequest
client
only.Source§impl From<ProduceRequest> for RequestKind
Available on crate feature messages_enums
only.
impl From<ProduceRequest> for RequestKind
messages_enums
only.Source§fn from(value: ProduceRequest) -> RequestKind
fn from(value: ProduceRequest) -> RequestKind
Source§impl HeaderVersion for ProduceRequest
impl HeaderVersion for ProduceRequest
Source§fn header_version(version: i16) -> i16
fn header_version(version: i16) -> i16
Source§impl Message for ProduceRequest
impl Message for ProduceRequest
Source§const VERSIONS: VersionRange
const VERSIONS: VersionRange
Source§const DEPRECATED_VERSIONS: Option<VersionRange>
const DEPRECATED_VERSIONS: Option<VersionRange>
Source§impl PartialEq for ProduceRequest
impl PartialEq for ProduceRequest
Source§impl Request for ProduceRequest
Available on crate features client
and broker
only.
impl Request for ProduceRequest
client
and broker
only.