Struct nats::jetstream::Consumer [−][src]
JetStream
reliable consumption functionality.
Fields
nc: NatsClient
The underlying NATS client
stream: String
The stream that this Consumer
is interested in
cfg: ConsumerConfig
The backing configuration for this Consumer
push_subscriber: Option<Subscription>
The backing Subscription
used if this is a
push-based consumer.
timeout: Duration
The amount of time that is waited before erroring
out during process
and process_batch
. Defaults
to 5ms, which is likely to be far too low for
workloads crossing physical sites.
dedupe_window: RangeTree
Contains ranges of processed messages that will be filtered out upon future receipt.
Implementations
impl Consumer
[src]
pub fn from_consumer_info(ci: ConsumerInfo, nc: NatsClient) -> Result<Consumer>
[src]
Instantiate a JetStream
Consumer
from an existing
ConsumerInfo
that may have been returned
from the nats::Connection::list_consumers
iterator.
Requires the jetstream
feature.
pub fn create_or_open<S, C>(
nc: NatsClient,
stream: S,
cfg: C
) -> Result<Consumer> where
S: AsRef<str>,
ConsumerConfig: From<C>,
[src]
nc: NatsClient,
stream: S,
cfg: C
) -> Result<Consumer> where
S: AsRef<str>,
ConsumerConfig: From<C>,
Instantiate a JetStream
Consumer
. Performs a check to see if the consumer
already exists, and creates it if not. If you want to use an existing
Consumer
without this check and creation, use the Consumer::existing
method.
Requires the jetstream
feature.
pub fn existing<S, C>(nc: NatsClient, stream: S, cfg: C) -> Result<Consumer> where
S: AsRef<str>,
ConsumerConfig: From<C>,
[src]
S: AsRef<str>,
ConsumerConfig: From<C>,
Use an existing JetStream
Consumer
Requires the jetstream
feature.
Auto Trait Implementations
impl !RefUnwindSafe for Consumer
impl Send for Consumer
impl Sync for Consumer
impl Unpin for Consumer
impl !UnwindSafe for Consumer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,