Struct azeventhubs::consumer::ReadEventOptions
source · pub struct ReadEventOptions {
pub prefetch_count: u32,
pub owner_level: Option<i64>,
pub track_last_enqueued_event_properties: bool,
}Expand description
The set of options that can be specified to configure behavior when reading events from an
EventHubConsumerClient
Fields§
§prefetch_count: u32The number of events that will be eagerly requested from the Event Hubs service and queued locally without regard to whether a read operation is currently active, intended to help maximize throughput by allowing events to be read from from a local cache rather than waiting on a service request.
Default to DEFAULT_PREFETCH_COUNT
owner_level: Option<i64>When populated, the owner level indicates that a reading is intended to be performed
exclusively for events in the requested partition and for the associated consumer group. To
do so, reading will attempt to assert ownership over the partition; in the case where more
than one exclusive reader in the consumer group attempts to assert ownership for the same
partition, the one having a larger owner_level value will “win”.
When an exclusive reader is used, other readers which are non-exclusive or which have a lower owner level will either not be allowed to be created, if they already exist, will encounter an exception during the next attempted operation.
track_last_enqueued_event_properties: boolIndicates whether or not the reader should request information on the last enqueued event on the partition associated with a given event, and track that information as events are read.
When information about a partition’s last enqueued event is being tracked, each event received from the Event Hubs service will carry metadata about the partition that it otherwise would not. This results in a small amount of additional network bandwidth consumption that is generally a favorable trade-off when considered against periodically making requests for partition properties using one of the Event Hub clients.
Implementations§
source§impl ReadEventOptions
impl ReadEventOptions
sourcepub fn with_prefetch_count(self, prefetch_count: u32) -> Self
pub fn with_prefetch_count(self, prefetch_count: u32) -> Self
Sets the prefetch count.
sourcepub fn with_owner_level(self, owner_level: i64) -> Self
pub fn with_owner_level(self, owner_level: i64) -> Self
Sets the owner level.
sourcepub fn with_track_last_enqueued_event_properties(
self,
track_last_enqueued_event_properties: bool
) -> Self
pub fn with_track_last_enqueued_event_properties( self, track_last_enqueued_event_properties: bool ) -> Self
Sets the track last enqueued event properties.
Trait Implementations§
source§impl Clone for ReadEventOptions
impl Clone for ReadEventOptions
source§fn clone(&self) -> ReadEventOptions
fn clone(&self) -> ReadEventOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ReadEventOptions
impl Debug for ReadEventOptions
source§impl Default for ReadEventOptions
impl Default for ReadEventOptions
source§impl Hash for ReadEventOptions
impl Hash for ReadEventOptions
source§impl PartialEq for ReadEventOptions
impl PartialEq for ReadEventOptions
source§fn eq(&self, other: &ReadEventOptions) -> bool
fn eq(&self, other: &ReadEventOptions) -> bool
self and other values to be equal, and is used
by ==.impl Eq for ReadEventOptions
impl StructuralEq for ReadEventOptions
impl StructuralPartialEq for ReadEventOptions
Auto Trait Implementations§
impl RefUnwindSafe for ReadEventOptions
impl Send for ReadEventOptions
impl Sync for ReadEventOptions
impl Unpin for ReadEventOptions
impl UnwindSafe for ReadEventOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.