pub enum SystemConsumerStrategy {
DispatchToSingle,
RoundRobin,
Pinned,
PinnedByCorrelation,
Custom(String),
}Expand description
System supported consumer strategies for use with persistent subscriptions.
Variants§
DispatchToSingle
Distributes events to a single client until the bufferSize is reached. After which the next client is selected in a round robin style, and the process is repeated.
RoundRobin
Distributes events to all clients evenly. If the client buffer-size is reached the client is ignored until events are acknowledged/not acknowledged.
Pinned
For use with an indexing projection such as the system $by_category projection. Event Store inspects event for its source stream id, hashing the id to one of 1024 buckets assigned to individual clients. When a client disconnects it’s buckets are assigned to other clients. When a client connects, it is assigned some of the existing buckets. This naively attempts to maintain a balanced workload. The main aim of this strategy is to decrease the likelihood of concurrency and ordering issues while maintaining load balancing. This is not a guarantee, and you should handle the usual ordering and concurrency issues.
PinnedByCorrelation
Custom(String)
Trait Implementations§
source§impl Clone for SystemConsumerStrategy
impl Clone for SystemConsumerStrategy
source§fn clone(&self) -> SystemConsumerStrategy
fn clone(&self) -> SystemConsumerStrategy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SystemConsumerStrategy
impl Debug for SystemConsumerStrategy
source§impl<'de> Deserialize<'de> for SystemConsumerStrategy
impl<'de> Deserialize<'de> for SystemConsumerStrategy
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 Display for SystemConsumerStrategy
impl Display for SystemConsumerStrategy
source§impl PartialEq for SystemConsumerStrategy
impl PartialEq for SystemConsumerStrategy
source§fn eq(&self, other: &SystemConsumerStrategy) -> bool
fn eq(&self, other: &SystemConsumerStrategy) -> bool
self and other values to be equal, and is used
by ==.source§impl Serialize for SystemConsumerStrategy
impl Serialize for SystemConsumerStrategy
impl Eq for SystemConsumerStrategy
impl StructuralEq for SystemConsumerStrategy
impl StructuralPartialEq for SystemConsumerStrategy
Auto Trait Implementations§
impl RefUnwindSafe for SystemConsumerStrategy
impl Send for SystemConsumerStrategy
impl Sync for SystemConsumerStrategy
impl Unpin for SystemConsumerStrategy
impl UnwindSafe for SystemConsumerStrategy
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request