Enum rdkafka::consumer::CommitMode
source · pub enum CommitMode {
Sync = 0,
Async = 1,
}
Expand description
Specifies whether a commit should be performed synchronously or asynchronously.
A commit is performed via Consumer::commit
or one of its variants.
Regardless of the CommitMode
, the commit APIs enqueue the commit request
in a local work queue. A separate worker thread picks up this commit request
and forwards it to the Kafka broker over the network.
The difference between CommitMode::Sync
and CommitMode::Async
is in
whether the caller waits for the Kafka broker to respond that it finished
handling the commit request.
Note that the commit APIs are not async in the Rust sense due to the lack of a callback-based interface exposed by librdkafka. See librdkafka#3212.
Variants§
Sync = 0
In Sync
mode, the caller blocks until the Kafka broker finishes
processing the commit request.
Async = 1
In Async
mode, the caller enqueues the commit request in a local
work queue and returns immediately.
Trait Implementations§
source§impl Clone for CommitMode
impl Clone for CommitMode
source§fn clone(&self) -> CommitMode
fn clone(&self) -> CommitMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CommitMode
impl Debug for CommitMode
impl Copy for CommitMode
Auto Trait Implementations§
impl Freeze for CommitMode
impl RefUnwindSafe for CommitMode
impl Send for CommitMode
impl Sync for CommitMode
impl Unpin for CommitMode
impl UnwindSafe for CommitMode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)