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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more