pub enum NatsMessageId {
ContentHash,
None,
}Expand description
How nats_output chooses the Nats-Msg-Id header of each message.
Variants§
ContentHash
The id is derived from the message itself: the number of the
transaction that produced the output, a hash of the encoded payload,
and the count of earlier messages in the same transaction with the
same payload. The id is independent of the data format and is
reproduced when the pipeline replays the same output after a restart,
so the server stores each message once within the stream’s duplicate
window. Two messages are only deduplicated when their encoded bytes
are identical, so exact replay deduplication requires the format to
emit one record per message (buffer_size_records: 1 for json).
None
No Nats-Msg-Id header: output replayed after a restart is stored
again, and every consumer of the stream must tolerate duplicates.
Trait Implementations§
Source§impl Clone for NatsMessageId
impl Clone for NatsMessageId
impl Copy for NatsMessageId
Source§impl Debug for NatsMessageId
impl Debug for NatsMessageId
Source§impl Default for NatsMessageId
impl Default for NatsMessageId
Source§impl<'de> Deserialize<'de> for NatsMessageId
impl<'de> Deserialize<'de> for NatsMessageId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for NatsMessageId
Source§impl PartialEq for NatsMessageId
impl PartialEq for NatsMessageId
Source§impl Serialize for NatsMessageId
impl Serialize for NatsMessageId
impl StructuralPartialEq for NatsMessageId
Auto Trait Implementations§
impl Forget for NatsMessageId
impl Freeze for NatsMessageId
impl RefUnwindSafe for NatsMessageId
impl Send for NatsMessageId
impl Sync for NatsMessageId
impl Unpin for NatsMessageId
impl UnsafeUnpin for NatsMessageId
impl UnwindSafe for NatsMessageId
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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