pub struct NatsInputConfig {
pub connection_config: ConnectOptions,
pub stream_name: String,
pub inactivity_timeout: Option<ConfigDuration>,
pub retry_interval: Option<ConfigDuration>,
pub retry_max_interval: Option<ConfigDuration>,
pub retry_max_attempts: Option<u32>,
pub consumer_config: ConsumerConfig,
}Fields§
§connection_config: ConnectOptions§stream_name: String§inactivity_timeout: Option<ConfigDuration>Maximum time to wait for the next message before running a
stream/server health check, for example 60s. Must be at least one
second. Unset selects the default, DEFAULT_INACTIVITY_TIMEOUT.
retry_interval: Option<ConfigDuration>Delay before the first automatic reconnect attempt after a failure,
for example 5s. The delay doubles on every consecutive failure, up
to retry_max_interval, and is jittered to avoid synchronized retries
across connectors. Must be at least one second. Unset selects the
default, DEFAULT_RETRY_INTERVAL.
retry_max_interval: Option<ConfigDuration>Upper bound on the delay between consecutive reconnect attempts, for
example 5m. Must be at least retry_interval. Unset selects the
default, DEFAULT_RETRY_MAX_INTERVAL.
retry_max_attempts: Option<u32>Maximum number of consecutive failed reconnect attempts before the connector gives up and reports a fatal error. When unset, the connector retries indefinitely. Must be at least 1 when set.
consumer_config: ConsumerConfigImplementations§
Source§impl NatsInputConfig
impl NatsInputConfig
Sourcepub fn inactivity_timeout(&self) -> ConfigDuration
pub fn inactivity_timeout(&self) -> ConfigDuration
The inactivity timeout in effect, or DEFAULT_INACTIVITY_TIMEOUT.
Sourcepub fn retry_interval(&self) -> ConfigDuration
pub fn retry_interval(&self) -> ConfigDuration
The first reconnect delay in effect, or DEFAULT_RETRY_INTERVAL.
Sourcepub fn retry_max_interval(&self) -> ConfigDuration
pub fn retry_max_interval(&self) -> ConfigDuration
The reconnect delay bound in effect, or DEFAULT_RETRY_MAX_INTERVAL.
Trait Implementations§
Source§impl Clone for NatsInputConfig
impl Clone for NatsInputConfig
Source§impl Debug for NatsInputConfig
impl Debug for NatsInputConfig
Source§impl<'de> Deserialize<'de> for NatsInputConfig
impl<'de> Deserialize<'de> for NatsInputConfig
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 NatsInputConfig
Source§impl PartialEq for NatsInputConfig
impl PartialEq for NatsInputConfig
Source§impl Serialize for NatsInputConfig
impl Serialize for NatsInputConfig
impl StructuralPartialEq for NatsInputConfig
Auto Trait Implementations§
impl Forget for NatsInputConfig
impl Freeze for NatsInputConfig
impl Move for NatsInputConfig
impl RefUnwindSafe for NatsInputConfig
impl Send for NatsInputConfig
impl Sync for NatsInputConfig
impl Unpin for NatsInputConfig
impl UnsafeUnpin for NatsInputConfig
impl UnwindSafe for NatsInputConfig
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