pub struct RecipientTransportStore { /* private fields */ }Implementations§
Source§impl RecipientTransportStore
impl RecipientTransportStore
pub fn new(pool: Arc<ConnectionPool>) -> Self
Sourcepub async fn list_due_acknowledgements(
&self,
now: i64,
limit: usize,
) -> StorageResult<Vec<AckJournalEntry>>
pub async fn list_due_acknowledgements( &self, now: i64, limit: usize, ) -> StorageResult<Vec<AckJournalEntry>>
Pending entries at or before now (UTC microseconds), oldest first.
Pages are bounded to 1,000 entries; a zero limit returns no entries.
Sourcepub async fn finish_acknowledgement(
&self,
delivery_attempt_id: Uuid,
) -> StorageResult<bool>
pub async fn finish_acknowledgement( &self, delivery_attempt_id: Uuid, ) -> StorageResult<bool>
Finish a pending entry; terminal or absent entries return false unchanged.
Sourcepub async fn record_acknowledgement_failed_try(
&self,
delivery_attempt_id: Uuid,
not_before: i64,
) -> StorageResult<bool>
pub async fn record_acknowledgement_failed_try( &self, delivery_attempt_id: Uuid, not_before: i64, ) -> StorageResult<bool>
Persist one failed try and its next eligible UTC-microsecond deadline. The integer constraint aborts a counter overflow without changing the row.
Sourcepub async fn retire_acknowledgement(
&self,
delivery_attempt_id: Uuid,
reason: AcknowledgementRetirementReason,
) -> StorageResult<bool>
pub async fn retire_acknowledgement( &self, delivery_attempt_id: Uuid, reason: AcknowledgementRetirementReason, ) -> StorageResult<bool>
Retire a pending acknowledgement without touching its message or replay claim.
Sourcepub async fn ack_if_replayed(
&self,
binding: Value,
recipient_actor: &str,
) -> StorageResult<Option<RecipientCommitResult>>
pub async fn ack_if_replayed( &self, binding: Value, recipient_actor: &str, ) -> StorageResult<Option<RecipientCommitResult>>
Answer an already committed logical message before its plaintext is
interpreted again. The authenticated caller supplies the current local
actor and binding; a hit writes only the new attempt’s ack journal row.
A miss makes no claim: commit rechecks replay under its own writer
transaction after the new delivery has been validated.
Sourcepub async fn commit(
&self,
input: RecipientCommit,
) -> StorageResult<RecipientCommitResult>
pub async fn commit( &self, input: RecipientCommit, ) -> StorageResult<RecipientCommitResult>
Commit all recipient effects together, or none. A replay keeps its first disposition and creates only the acknowledgement for a new attempt.
A stored disposition writes the message note. A quarantined one writes
the quarantine record and no message note (ADR-105 A.8 Receiving, step
4), after dropping the oldest item of its quarantine bound when that
bound is full. Dropped items are returned in evicted and logged; their
replay identities stay claimed.
Auto Trait Implementations§
impl !RefUnwindSafe for RecipientTransportStore
impl !UnwindSafe for RecipientTransportStore
impl Freeze for RecipientTransportStore
impl Send for RecipientTransportStore
impl Sync for RecipientTransportStore
impl Unpin for RecipientTransportStore
impl UnsafeUnpin for RecipientTransportStore
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