Struct nakadi_types::partition::Partition[][src]

pub struct Partition {
    pub partition: PartitionId,
    pub oldest_available_offset: CursorOffset,
    pub newest_available_offset: CursorOffset,
    pub unconsumed_events: Option<u64>,
}
Expand description

Partition information. Can be helpful when trying to start a stream using an unmanaged API.

This information is not related to the state of the consumer clients.

See also Nakadi Manual

Fields

partition: PartitionIdoldest_available_offset: CursorOffset

An offset of the oldest available Event in that partition. This value will be changing upon removal of Events from the partition by the background archiving/cleanup mechanism.

newest_available_offset: CursorOffset

An offset of the newest available Event in that partition. This value will be changing upon reception of new events for this partition by Nakadi.

This value can be used to construct a cursor when opening streams (see GET /event-type/{name}/events for details).

Might assume the special name BEGIN, meaning a pointer to the offset of the oldest available event in the partition.

unconsumed_events: Option<u64>

Approximate number of events unconsumed by the client. This is also known as consumer lag and is used for monitoring purposes by consumers interested in keeping an eye on the number of unconsumed events.

If the event type uses ‘compact’ cleanup policy - then the actual number of unconsumed events in this partition can be lower than the one reported in this field.

Implementations

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

Deserialize this value from the given Serde deserializer. Read more

Performs the conversion.

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.