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

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,
}

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

impl SubscriptionInput[src]

Trait Implementations

impl Clone for SubscriptionInput[src]

impl Debug for SubscriptionInput[src]

impl Serialize for SubscriptionInput[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> 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>,