Enum nakadi_types::event_type::PartitionStrategy [−][src]
pub enum PartitionStrategy { Random, Hash, UserDefined, }
Expand description
Determines how the assignment of the event to a partition should be handled.
The default is random
.
See also Nakadi Manual
Variants
Resolution of the target partition happens randomly (events are evenly distributed on the topic’s partitions).
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”.
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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for PartitionStrategy
impl Send for PartitionStrategy
impl Sync for PartitionStrategy
impl Unpin for PartitionStrategy
impl UnwindSafe for PartitionStrategy
Blanket Implementations
Mutably borrows from an owned value. Read more