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 Subscription
s. Since the interface
for creating Subscription
s 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: OwningApplication
event_types: EventTypeNames
consumer_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.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SubscriptionInput
impl Send for SubscriptionInput
impl Sync for SubscriptionInput
impl Unpin for SubscriptionInput
impl UnwindSafe for SubscriptionInput
Blanket Implementations
Mutably borrows from an owned value. Read more