pub struct KinesisStream { /* private fields */ }Expand description
A subscription descriptor for one Kinesis stream.
Every shard resumes from its stored checkpoint, and a shard without one starts at the tip.
To open somewhere else, wrap the descriptor in the framework’s start_at(..) clause with a
KinesisPosition.
Implements SubscriptionSource, so it can sit inline in the #[subscriber(..)]
decorator:
use ruststream_kinesis::KinesisStream;
let source = KinesisStream::new("orders").batch(500);Implementations§
Source§impl KinesisStream
impl KinesisStream
Sourcepub fn poll_interval(self, interval: Duration) -> Self
pub fn poll_interval(self, interval: Duration) -> Self
The pause between reads on an idle shard. Defaults to 1 second, the service’s own recommendation; lower values spend the 5-reads-per-second budget faster.
Sourcepub fn create_if_missing(self, shards: i32) -> Self
pub fn create_if_missing(self, shards: i32) -> Self
Creates the stream with shards provisioned shards on subscribe when it does not
exist yet. Meant for local development and tests; production streams are usually
managed as infrastructure.
Trait Implementations§
Source§impl Clone for KinesisStream
impl Clone for KinesisStream
Source§fn clone(&self) -> KinesisStream
fn clone(&self) -> KinesisStream
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 KinesisStream
impl Debug for KinesisStream
impl Eq for KinesisStream
Source§impl PartialEq for KinesisStream
impl PartialEq for KinesisStream
impl StructuralPartialEq for KinesisStream
Source§impl SubscriptionSource<ConnectedKinesisBroker> for KinesisStream
impl SubscriptionSource<ConnectedKinesisBroker> for KinesisStream
Source§type Subscriber = KinesisSubscriber
type Subscriber = KinesisSubscriber
The subscriber type this source opens.
Source§async fn subscribe(
self,
connected: &ConnectedKinesisBroker,
) -> Result<KinesisSubscriber, KinesisError>
async fn subscribe( self, connected: &ConnectedKinesisBroker, ) -> Result<KinesisSubscriber, KinesisError>
Opens the subscription against the connected broker. Called once at startup. Read more
Auto Trait Implementations§
impl Freeze for KinesisStream
impl RefUnwindSafe for KinesisStream
impl Send for KinesisStream
impl Sync for KinesisStream
impl Unpin for KinesisStream
impl UnsafeUnpin for KinesisStream
impl UnwindSafe for KinesisStream
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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.