[−][src]Struct nakadi_types::model::subscription::StreamParameters
Parameters for starting a new stream on a subscription
See also Nakadi Manual
Fields
partitions: Vec<EventTypePartition>
List of partitions to read from in this stream. If absent or empty - then the partitions will be automatically assigned by Nakadi.
max_uncommitted_events: Option<MaxUncommittedEvents>
The maximum number of uncommitted events that Nakadi will stream before pausing the stream. When in paused state and commit comes - the stream will resume.
batch_limit: Option<BatchLimit>
Maximum number of Events in each chunk (and therefore per partition) of the stream.
stream_limit: Option<StreamLimit>
Maximum number of Events in this stream (over all partitions being streamed in this connection)
batch_flush_timeout: Option<BatchFlushTimeoutSecs>
Maximum time in seconds to wait for the flushing of each chunk (per partition).
batch_timespan: Option<BatchTimespanSecs>
Useful for batching events based on their received_at timestamp. For example, if batch_timespan
is 5
seconds then Nakadi would flush a batch as soon as the difference in time between the first and the
last event in the batch exceeds 5 seconds. It waits for an event outside of the window to signal the
closure of a batch.
stream_timeout: Option<StreamTimeoutSecs>
Maximum time in seconds to wait for the flushing of each chunk (per partition).
commit_timeout: Option<CommitTimeoutSecs>
Maximum amount of seconds that Nakadi will be waiting for commit after sending a batch to a client. In case if commit does not come within this timeout, Nakadi will initialize stream termination, no new data will be sent. Partitions from this stream will be assigned to other streams. Setting commit_timeout to 0 is equal to setting it to the maximum allowed value - 60 seconds.
Methods
impl StreamParameters
[src]
pub fn from_env() -> Result<Self, Error>
[src]
pub fn from_env_prefixed<T: AsRef<str>>(prefix: T) -> Result<Self, Error>
[src]
pub fn fill_from_env(&mut self) -> Result<(), Error>
[src]
pub fn fill_from_env_prefixed<T: AsRef<str>>(
&mut self,
prefix: T
) -> Result<(), Error>
[src]
&mut self,
prefix: T
) -> Result<(), Error>
pub fn partitions(self, partitions: Vec<EventTypePartition>) -> Self
[src]
List of partitions to read from in this stream. If absent or empty - then the partitions will be automatically assigned by Nakadi.
pub fn max_uncommitted_events<T: Into<MaxUncommittedEvents>>(
self,
value: T
) -> Self
[src]
self,
value: T
) -> Self
The maximum number of uncommitted events that Nakadi will stream before pausing the stream.
When in paused state and commit comes - the stream will resume.
pub fn batch_limit<T: Into<BatchLimit>>(self, value: T) -> Self
[src]
Maximum number of Events in each chunk (and therefore per partition) of the stream.
pub fn stream_limit<T: Into<StreamLimit>>(self, value: T) -> Self
[src]
Maximum number of Events in this stream (over all partitions being streamed in this connection)
pub fn batch_flush_timeout<T: Into<BatchFlushTimeoutSecs>>(
self,
value: T
) -> Self
[src]
self,
value: T
) -> Self
Maximum time in seconds to wait for the flushing of each chunk (per partition).
pub fn batch_timespan<T: Into<BatchTimespanSecs>>(self, value: T) -> Self
[src]
Useful for batching events based on their received_at timestamp.
For example, if batch_timespan
is 5
seconds then Nakadi would flush a batch as soon as the difference in time between the first and the
last event in the batch exceeds 5 seconds. It waits for an event outside of the window to signal the
closure of a batch.
pub fn stream_timeout<T: Into<StreamTimeoutSecs>>(self, value: T) -> Self
[src]
Maximum time in seconds to wait for the flushing of each chunk (per partition).
pub fn commit_timeout<T: Into<CommitTimeoutSecs>>(self, value: T) -> Self
[src]
Maximum amount of seconds that Nakadi will be waiting for commit after sending a batch to a client.
In case if commit does not come within this timeout, Nakadi will initialize stream termination, no new data will be sent. Partitions from this stream will be assigned to other streams. Setting commit_timeout to 0 is equal to setting it to the maximum allowed value - 60 seconds.
pub fn effective_commit_timeout_secs(&self) -> u32
[src]
Returns the configured value or the Nakadi default
pub fn effective_max_uncommitted_events(&self) -> u32
[src]
Returns the configured value or the Nakadi default
pub fn effective_batch_limit(&self) -> u32
[src]
Returns the configured value or the Nakadi default
Trait Implementations
impl Clone for StreamParameters
[src]
fn clone(&self) -> StreamParameters
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for StreamParameters
[src]
impl Default for StreamParameters
[src]
fn default() -> StreamParameters
[src]
impl Serialize for StreamParameters
[src]
Auto Trait Implementations
impl RefUnwindSafe for StreamParameters
impl Send for StreamParameters
impl Sync for StreamParameters
impl Unpin for StreamParameters
impl UnwindSafe for StreamParameters
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,