pub struct SubscribeOptions {
pub consumer_group: Option<String>,
pub prefetch_count: Option<u16>,
pub ack_mode: AckMode,
pub from_beginning: bool,
pub filter: Option<String>,
pub concurrency: Option<usize>,
}Expand description
Options for subscribing to messages
Fields§
§consumer_group: Option<String>Consumer group/tag
prefetch_count: Option<u16>Prefetch count (how many messages to buffer)
ack_mode: AckModeAcknowledgment mode
from_beginning: boolWhether to start from the beginning (for Kafka)
filter: Option<String>Filter expression (for some brokers)
concurrency: Option<usize>Maximum concurrent handlers
Implementations§
Source§impl SubscribeOptions
impl SubscribeOptions
Sourcepub fn with_consumer_group(self, group: impl Into<String>) -> Self
pub fn with_consumer_group(self, group: impl Into<String>) -> Self
Set the consumer group
Sourcepub fn with_prefetch(self, count: u16) -> Self
pub fn with_prefetch(self, count: u16) -> Self
Set the prefetch count
Sourcepub fn with_ack_mode(self, mode: AckMode) -> Self
pub fn with_ack_mode(self, mode: AckMode) -> Self
Set the acknowledgment mode
Sourcepub fn from_beginning(self) -> Self
pub fn from_beginning(self) -> Self
Start from the beginning (Kafka)
Sourcepub fn with_concurrency(self, concurrency: usize) -> Self
pub fn with_concurrency(self, concurrency: usize) -> Self
Set the concurrency level
Trait Implementations§
Source§impl Clone for SubscribeOptions
impl Clone for SubscribeOptions
Source§fn clone(&self) -> SubscribeOptions
fn clone(&self) -> SubscribeOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubscribeOptions
impl Debug for SubscribeOptions
Source§impl Default for SubscribeOptions
impl Default for SubscribeOptions
Source§fn default() -> SubscribeOptions
fn default() -> SubscribeOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SubscribeOptions
impl RefUnwindSafe for SubscribeOptions
impl Send for SubscribeOptions
impl Sync for SubscribeOptions
impl Unpin for SubscribeOptions
impl UnwindSafe for SubscribeOptions
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.