Struct nakadi_types::subscription::SubscriptionInput[][src]

pub struct SubscriptionInput {
    pub id: Option<SubscriptionId>,
    pub owning_application: OwningApplication,
    pub event_types: EventTypeNames,
    pub consumer_group: Option<ConsumerGroup>,
    pub read_from: ReadFrom,
    pub initial_cursors: Option<Vec<EventTypeCursor>>,
    pub authorization: SubscriptionAuthorization,
}
Expand description

A struct to create a Subscription.

This struct is intended for creating Subscriptions. Since the interface for creating Subscriptions is slightly different from the actual entity this special struct exists.

Subscription

Subscription is a high level consumption unit.

Subscriptions allow applications to easily scale the number of clients by managing consumed event offsets and distributing load between instances. The key properties that identify subscription are ‘owning_application’, ‘event_types’ and ‘consumer_group’. It’s not possible to have two different subscriptions with these properties being the same.

See also Nakadi Manual

Fields

id: Option<SubscriptionId>

Must be set if and only if an updating operation is performed(e.g. Auth)

owning_application: OwningApplicationevent_types: EventTypeNamesconsumer_group: Option<ConsumerGroup>read_from: ReadFrom

Position to start reading events from.

Currently supported values:

  • Begin - read from the oldest available event.
  • End - read from the most recent offset.
  • Cursors - read from cursors provided in initial_cursors property. Applied when the client starts reading from a subscription.
initial_cursors: Option<Vec<EventTypeCursor>>

List of cursors to start reading from.

This property is required when read_from = ReadFrom::Cursors. The initial cursors should cover all partitions of subscription. Clients will get events starting from next offset positions.

authorization: SubscriptionAuthorization

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

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.