pub enum AutoCommit {
Immediate,
Delayed,
Rolling,
Disabled,
}Expand description
The auto ack / commit mechanism.
Variants§
Immediate
XREAD with NOACK. This acknowledges messages as soon as they are fetched.
In the event of service restart, this will likely result in messages being skipped.
Delayed
Auto ack and commit, but only after auto_commit_delay has passed since messages are read.
This is the default option, because users don’t have to do anything extra. This also mimicks Kafka clients.
Rolling
Do not auto ack, but continually commit acked messages to the server as new messages are read.
The consumer will not commit more often than auto_commit_interval.
You have to call RedisConsumer::ack manually.
This is the recommended option for achieving ‘at-least-once’ semantics.
Disabled
Never auto ack or commit.
You have to call RedisConsumer::ack and RedisConsumer::commit manually.
Trait Implementations§
Source§impl Clone for AutoCommit
impl Clone for AutoCommit
Source§fn clone(&self) -> AutoCommit
fn clone(&self) -> AutoCommit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AutoCommit
impl Debug for AutoCommit
Source§impl PartialEq for AutoCommit
impl PartialEq for AutoCommit
Source§fn eq(&self, other: &AutoCommit) -> bool
fn eq(&self, other: &AutoCommit) -> bool
self and other values to be equal, and is used by ==.