#[non_exhaustive]pub struct InitProducerIdRequest {
pub transactional_id: Option<TransactionalId>,
pub transaction_timeout_ms: i32,
pub producer_id: ProducerId,
pub producer_epoch: i16,
pub unknown_tagged_fields: BTreeMap<i32, Bytes>,
}
Expand description
Valid versions: 0-5
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: 0-5
transaction_timeout_ms: i32
The time in ms to wait before aborting idle transactions sent by this producer. This is only relevant if a TransactionalId has been defined.
Supported API versions: 0-5
producer_id: ProducerId
The producer id. This is used to disambiguate requests if a transactional id is reused following its expiration.
Supported API versions: 3-5
producer_epoch: i16
The producer’s current epoch. This will be checked against the producer epoch on the broker, and the request will return an error if they do not match.
Supported API versions: 3-5
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl InitProducerIdRequest
impl InitProducerIdRequest
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: 0-5
Sourcepub fn with_transaction_timeout_ms(self, value: i32) -> Self
pub fn with_transaction_timeout_ms(self, value: i32) -> Self
Sets transaction_timeout_ms
to the passed value.
The time in ms to wait before aborting idle transactions sent by this producer. This is only relevant if a TransactionalId has been defined.
Supported API versions: 0-5
Sourcepub fn with_producer_id(self, value: ProducerId) -> Self
pub fn with_producer_id(self, value: ProducerId) -> Self
Sets producer_id
to the passed value.
The producer id. This is used to disambiguate requests if a transactional id is reused following its expiration.
Supported API versions: 3-5
Sourcepub fn with_producer_epoch(self, value: i16) -> Self
pub fn with_producer_epoch(self, value: i16) -> Self
Sets producer_epoch
to the passed value.
The producer’s current epoch. This will be checked against the producer epoch on the broker, and the request will return an error if they do not match.
Supported API versions: 3-5
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 InitProducerIdRequest
impl Clone for InitProducerIdRequest
Source§fn clone(&self) -> InitProducerIdRequest
fn clone(&self) -> InitProducerIdRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InitProducerIdRequest
impl Debug for InitProducerIdRequest
Source§impl Decodable for InitProducerIdRequest
Available on crate feature broker
only.
impl Decodable for InitProducerIdRequest
broker
only.Source§impl Default for InitProducerIdRequest
impl Default for InitProducerIdRequest
Source§impl Encodable for InitProducerIdRequest
Available on crate feature client
only.
impl Encodable for InitProducerIdRequest
client
only.Source§impl From<InitProducerIdRequest> for RequestKind
Available on crate feature messages_enums
only.
impl From<InitProducerIdRequest> for RequestKind
messages_enums
only.Source§fn from(value: InitProducerIdRequest) -> RequestKind
fn from(value: InitProducerIdRequest) -> RequestKind
Source§impl HeaderVersion for InitProducerIdRequest
impl HeaderVersion for InitProducerIdRequest
Source§fn header_version(version: i16) -> i16
fn header_version(version: i16) -> i16
Source§impl Message for InitProducerIdRequest
impl Message for InitProducerIdRequest
Source§const VERSIONS: VersionRange
const VERSIONS: VersionRange
Source§const DEPRECATED_VERSIONS: Option<VersionRange> = None
const DEPRECATED_VERSIONS: Option<VersionRange> = None
Source§impl PartialEq for InitProducerIdRequest
impl PartialEq for InitProducerIdRequest
Source§impl Request for InitProducerIdRequest
Available on crate features client
and broker
only.
impl Request for InitProducerIdRequest
client
and broker
only.