pub struct MessageBusConfig {Show 13 fields
pub database: Option<DatabaseConfig>,
pub encoding: SerializationEncoding,
pub timestamps_as_iso8601: bool,
pub buffer_interval_ms: Option<u32>,
pub autotrim_mins: Option<u32>,
pub use_trader_prefix: bool,
pub use_trader_id: bool,
pub use_instance_id: bool,
pub streams_prefix: String,
pub stream_per_topic: bool,
pub external_streams: Option<Vec<String>>,
pub types_filter: Option<Vec<String>>,
pub heartbeat_interval_secs: Option<u16>,
}
Expand description
Configuration for MessageBus
instances.
Fields§
§database: Option<DatabaseConfig>
The configuration for the message bus backing database.
encoding: SerializationEncoding
The encoding for database operations, controls the type of serializer used.
timestamps_as_iso8601: bool
If timestamps should be persisted as ISO 8601 strings.
If false
, then timestamps will be persisted as UNIX nanoseconds.
buffer_interval_ms: Option<u32>
The buffer interval (milliseconds) between pipelined/batched transactions. The recommended range if using buffered pipelining is [10, 1000] milliseconds, with a good compromise being 100 milliseconds.
autotrim_mins: Option<u32>
The lookback window in minutes for automatic stream trimming. The actual window may extend up to one minute beyond the specified value since streams are trimmed at most once every minute. This feature requires Redis version 6.2 or higher; otherwise, it will result in a command syntax error.
use_trader_prefix: bool
If a ‘trader-’ prefix is used for stream names.
use_trader_id: bool
If the trader’s ID is used for stream names.
use_instance_id: bool
If the trader’s instance ID is used for stream names. Default is false
.
streams_prefix: String
The prefix for externally published stream names. Must have a database
config.
stream_per_topic: bool
If true
, messages will be written to separate streams per topic.
If false
, all messages will be written to the same stream.
external_streams: Option<Vec<String>>
The external stream keys the message bus will listen to for publishing deserialized message payloads internally.
types_filter: Option<Vec<String>>
A list of serializable types not to publish externally.
heartbeat_interval_secs: Option<u16>
The heartbeat interval (seconds).
Trait Implementations§
Source§impl Clone for MessageBusConfig
impl Clone for MessageBusConfig
Source§fn clone(&self) -> MessageBusConfig
fn clone(&self) -> MessageBusConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MessageBusConfig
impl Debug for MessageBusConfig
Source§impl Default for MessageBusConfig
impl Default for MessageBusConfig
Source§fn default() -> Self
fn default() -> Self
Creates a new default MessageBusConfig
instance.
Source§impl<'de> Deserialize<'de> for MessageBusConfigwhere
MessageBusConfig: Default,
impl<'de> Deserialize<'de> for MessageBusConfigwhere
MessageBusConfig: Default,
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>,
Source§impl PartialEq for MessageBusConfig
impl PartialEq for MessageBusConfig
Source§impl Serialize for MessageBusConfig
impl Serialize for MessageBusConfig
impl Eq for MessageBusConfig
impl StructuralPartialEq for MessageBusConfig
Auto Trait Implementations§
impl Freeze for MessageBusConfig
impl RefUnwindSafe for MessageBusConfig
impl Send for MessageBusConfig
impl Sync for MessageBusConfig
impl Unpin for MessageBusConfig
impl UnwindSafe for MessageBusConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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