[][src]Enum nakadi_types::model::event_type::PartitionStrategy

pub enum PartitionStrategy {
    Random,
    Hash,
    UserDefined,
}

Determines how the assignment of the event to a partition should be handled.

The default is random.

See also Nakadi Manual

Variants

Random

Resolution of the target partition happens randomly (events are evenly distributed on the topic’s partitions).

Hash

Resolution of the partition follows the computation of a hash from the value of the fields indicated in the EventType’s partition_key_fields, guaranteeing that Events with same values on those fields end in the same partition. Given the event type’s category is DataChangeEvent, field path is considered relative to “data”.

UserDefined

Target partition is defined by the client. As long as the indicated partition exists, Event assignment will respect this value. Correctness of the relative ordering of events is under the responsibility of the Producer. Requires that the client provides the target partition on metadata.partition (See EventMetadata). Failure to do so will reject the publishing of the Event.

Trait Implementations

impl Clone for PartitionStrategy[src]

impl Copy for PartitionStrategy[src]

impl Debug for PartitionStrategy[src]

impl Default for PartitionStrategy[src]

impl<'de> Deserialize<'de> for PartitionStrategy[src]

impl Eq for PartitionStrategy[src]

impl PartialEq<PartitionStrategy> for PartitionStrategy[src]

impl Serialize for PartitionStrategy[src]

impl StructuralEq for PartitionStrategy[src]

impl StructuralPartialEq for PartitionStrategy[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,