pub struct KinesisMessage { /* private fields */ }Expand description
A record delivered by a KinesisSubscriber.
Acknowledgement is a per-shard checkpoint, not per-message settlement: ack marks this
record handled, and when every earlier record on the shard is handled too, the watermark
advances and is persisted to the lease store. nack(requeue = true) answers
AckError::Unsupported: a sharded log repositions, it cannot requeue one message. The record
stays unhandled, so the watermark stops advancing, and the records from it onward are delivered
again when the shard’s lease is next taken. nack(requeue = false) skips the record
(checkpoints past it).
In a handler, HandlerOutcome::ack() is the ack, HandlerOutcome::drop() the skip, and
HandlerOutcome::retry() the requeue, unless the registration declares max_attempts(..) or
a dead-letter stream: then the retry publishes a counted copy of the record back to its stream.
Trait Implementations§
Source§impl BuildBatchContext<KinesisMessage> for KinesisBatchContext
impl BuildBatchContext<KinesisMessage> for KinesisBatchContext
Source§fn build(first: &KinesisMessage) -> Self
fn build(first: &KinesisMessage) -> Self
Source§impl BuildContext<KinesisMessage> for KinesisContext
impl BuildContext<KinesisMessage> for KinesisContext
Source§fn build(msg: &KinesisMessage) -> Self
fn build(msg: &KinesisMessage) -> Self
msg.Source§impl Debug for KinesisMessage
impl Debug for KinesisMessage
Source§impl IncomingMessage for KinesisMessage
impl IncomingMessage for KinesisMessage
Source§async fn ack(self) -> Result<(), AckError>
async fn ack(self) -> Result<(), AckError>
Source§async fn nack(self, requeue: bool) -> Result<(), AckError>
async fn nack(self, requeue: bool) -> Result<(), AckError>
requeue is true the broker should
redeliver according to its own retry policy; when false it should drop or dead-letter
the message. Read moreSource§fn partition_key(&self) -> Option<&[u8]>
fn partition_key(&self) -> Option<&[u8]>
None when the
message carries no key. Read moreSource§fn redelivery_count(&self) -> Option<u64>
fn redelivery_count(&self) -> Option<u64>
None
where the transport counts nothing. Read moreSource§fn decode_error(&self) -> Option<&CodecError>
fn decode_error(&self) -> Option<&CodecError>
None when it read the delivery
whole. Read moreSource§fn supports_nack_after(&self) -> bool
fn supports_nack_after(&self) -> bool
nack_after natively. Read moreSource§impl Partitioned for KinesisMessage
impl Partitioned for KinesisMessage
Source§fn partition_key(&self) -> Option<&[u8]>
fn partition_key(&self) -> Option<&[u8]>
None if the broker should pick a partition.Source§impl Positioned for KinesisMessage
impl Positioned for KinesisMessage
Source§type Position = KinesisPosition
type Position = KinesisPosition
Seeker::Position.Source§fn position(&self) -> KinesisPosition
fn position(&self) -> KinesisPosition
Auto Trait Implementations§
impl !Freeze for KinesisMessage
impl !RefUnwindSafe for KinesisMessage
impl !UnwindSafe for KinesisMessage
impl Send for KinesisMessage
impl Sync for KinesisMessage
impl Unpin for KinesisMessage
impl UnsafeUnpin for KinesisMessage
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
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> ⓘ
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> ⓘ
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 more