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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.