xml/Azure.Messaging.EventHubs.Consumer/ReadEventOptions.xml (374 lines of code) (raw):

<Type Name="ReadEventOptions" FullName="Azure.Messaging.EventHubs.Consumer.ReadEventOptions"> <TypeSignature Language="C#" Value="public class ReadEventOptions" /> <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ReadEventOptions extends System.Object" /> <TypeSignature Language="DocId" Value="T:Azure.Messaging.EventHubs.Consumer.ReadEventOptions" /> <TypeSignature Language="VB.NET" Value="Public Class ReadEventOptions" /> <TypeSignature Language="F#" Value="type ReadEventOptions = class" /> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.4.0.0</AssemblyVersion> <AssemblyVersion>5.4.1.0</AssemblyVersion> <AssemblyVersion>5.5.0.0</AssemblyVersion> <AssemblyVersion>5.6.0.0</AssemblyVersion> <AssemblyVersion>5.6.1.0</AssemblyVersion> <AssemblyVersion>5.6.2.0</AssemblyVersion> <AssemblyVersion>5.7.0.0</AssemblyVersion> <AssemblyVersion>5.7.1.0</AssemblyVersion> <AssemblyVersion>5.7.2.0</AssemblyVersion> <AssemblyVersion>5.7.3.0</AssemblyVersion> <AssemblyVersion>5.7.4.0</AssemblyVersion> <AssemblyVersion>5.7.5.0</AssemblyVersion> <AssemblyVersion>5.8.0.0</AssemblyVersion> <AssemblyVersion>5.8.1.0</AssemblyVersion> <AssemblyVersion>5.9.0.0</AssemblyVersion> <AssemblyVersion>5.9.1.0</AssemblyVersion> <AssemblyVersion>5.9.2.0</AssemblyVersion> <AssemblyVersion>5.9.3.0</AssemblyVersion> <AssemblyVersion>5.10.0.0</AssemblyVersion> <AssemblyVersion>5.11.0.0</AssemblyVersion> <AssemblyVersion>5.11.1.0</AssemblyVersion> <AssemblyVersion>5.11.2.0</AssemblyVersion> <AssemblyVersion>5.11.3.0</AssemblyVersion> <AssemblyVersion>5.11.4.0</AssemblyVersion> <AssemblyVersion>5.11.5.0</AssemblyVersion> <AssemblyVersion>5.11.6.0</AssemblyVersion> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <Base> <BaseTypeName>System.Object</BaseTypeName> </Base> <Interfaces /> <Docs> <summary> The set of options that can be specified to configure behavior when reading events from an <see cref="T:Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient" />. </summary> <remarks>To be added.</remarks> </Docs> <Members> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="public ReadEventOptions ();" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.#ctor" /> <MemberSignature Language="VB.NET" Value="Public Sub New ()" /> <MemberType>Constructor</MemberType> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <Parameters /> <Docs> <summary>To be added.</summary> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="CacheEventCount"> <MemberSignature Language="C#" Value="public int CacheEventCount { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance int32 CacheEventCount" /> <MemberSignature Language="DocId" Value="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.CacheEventCount" /> <MemberSignature Language="VB.NET" Value="Public Property CacheEventCount As Integer" /> <MemberSignature Language="F#" Value="member this.CacheEventCount : int with get, set" Usage="Azure.Messaging.EventHubs.Consumer.ReadEventOptions.CacheEventCount" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Int32</ReturnType> </ReturnValue> <Docs> <summary> The maximum number of events that will be read from the Event Hubs service and held in a local memory cache when reading is active and events are being emitted to an enumerator for processing. </summary> <value> The <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.CacheEventCount" /> is a control that developers can use to help tune performance for the specific needs of an application, given its expected size of events, throughput needs, and expected scenarios for using Event Hubs. </value> <remarks> The size of this cache has an influence on the efficiency of reading events from the Event Hubs service. The larger the size of the cache, the more efficiently service operations can be buffered in the background to improve throughput. This comes at the cost of additional memory use and potentially increases network I/O. For scenarios where the size of events is small and many events are flowing through the system, using a larger <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.CacheEventCount" /> and <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" /> may help improve throughput. For scenarios where the size of events is larger or when processing of events is expected to be a heavier and slower operation, using a smaller size <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.CacheEventCount" /> and <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" /> may help manage resource use without incurring a non-trivial cost to throughput. Regardless of the values, it is generally recommended that the <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" /> be at least 2-3 times as large as the <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.CacheEventCount" /> to allow for efficient buffering of service operations. </remarks> <exception cref="T:System.ArgumentOutOfRangeException">Occurs when the requested count is less than 1.</exception> </Docs> </Member> <Member MemberName="Equals"> <MemberSignature Language="C#" Value="public override bool Equals (object obj);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object obj) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.Equals(System.Object)" /> <MemberSignature Language="VB.NET" Value="Public Overrides Function Equals (obj As Object) As Boolean" /> <MemberSignature Language="F#" Value="override this.Equals : obj -&gt; bool" Usage="readEventOptions.Equals obj" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName> <AttributeName Language="F#">[&lt;System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)&gt;]</AttributeName> </Attribute> </Attributes> <ReturnValue> <ReturnType>System.Boolean</ReturnType> </ReturnValue> <Parameters> <Parameter Name="obj" Type="System.Object" /> </Parameters> <Docs> <param name="obj">The <see cref="T:System.Object" /> to compare with this instance.</param> <summary> Determines whether the specified <see cref="T:System.Object" /> is equal to this instance. </summary> <returns> <c>true</c> if the specified <see cref="T:System.Object" /> is equal to this instance; otherwise, <c>false</c>.</returns> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="GetHashCode"> <MemberSignature Language="C#" Value="public override int GetHashCode ();" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.GetHashCode" /> <MemberSignature Language="VB.NET" Value="Public Overrides Function GetHashCode () As Integer" /> <MemberSignature Language="F#" Value="override this.GetHashCode : unit -&gt; int" Usage="readEventOptions.GetHashCode " /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName> <AttributeName Language="F#">[&lt;System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)&gt;]</AttributeName> </Attribute> </Attributes> <ReturnValue> <ReturnType>System.Int32</ReturnType> </ReturnValue> <Parameters /> <Docs> <summary> Returns a hash code for this instance. </summary> <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="MaximumWaitTime"> <MemberSignature Language="C#" Value="public TimeSpan? MaximumWaitTime { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;valuetype System.TimeSpan&gt; MaximumWaitTime" /> <MemberSignature Language="DocId" Value="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.MaximumWaitTime" /> <MemberSignature Language="VB.NET" Value="Public Property MaximumWaitTime As Nullable(Of TimeSpan)" /> <MemberSignature Language="F#" Value="member this.MaximumWaitTime : Nullable&lt;TimeSpan&gt; with get, set" Usage="Azure.Messaging.EventHubs.Consumer.ReadEventOptions.MaximumWaitTime" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.TimeSpan&gt;</ReturnType> </ReturnValue> <Docs> <summary> The maximum amount of time to wait to for an event to be available when reading before reading an empty event. </summary> <value> If specified, should there be no events available before this waiting period expires, an empty event will be returned, allowing control to return to the reader that was waiting. <para>If <c>null</c>, the reader will wait forever for items to be available unless reading is canceled. Empty items will not be returned.</para></value> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentOutOfRangeException">Occurs when the requested wait time is negative.</exception> </Docs> </Member> <Member MemberName="OwnerLevel"> <MemberSignature Language="C#" Value="public long? OwnerLevel { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;int64&gt; OwnerLevel" /> <MemberSignature Language="DocId" Value="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.OwnerLevel" /> <MemberSignature Language="VB.NET" Value="Public Property OwnerLevel As Nullable(Of Long)" /> <MemberSignature Language="F#" Value="member this.OwnerLevel : Nullable&lt;int64&gt; with get, set" Usage="Azure.Messaging.EventHubs.Consumer.ReadEventOptions.OwnerLevel" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.Int64&gt;</ReturnType> </ReturnValue> <Docs> <summary> 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 <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.OwnerLevel" /> value will "win". <para>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.</para></summary> <value>The relative priority to associate with an exclusive reader; for a non-exclusive reader, this value should be <c>null</c>.</value> <remarks> An <see cref="T:Azure.Messaging.EventHubs.EventHubsException" /> will occur if an <see cref="T:Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient" /> is unable to read events from the requested Event Hub partition for the given consumer group. In this case, the <see cref="T:Azure.Messaging.EventHubs.EventHubsException.FailureReason" /> will be set to <see cref="F:Azure.Messaging.EventHubs.EventHubsException.FailureReason.ConsumerDisconnected" />. </remarks> <altmember cref="F:Azure.Messaging.EventHubs.EventHubsException.FailureReason.ConsumerDisconnected" /> <exception cref="T:Azure.Messaging.EventHubs.EventHubsException"> Occurs when the owner level is set and the <see cref="T:Azure.Messaging.EventHubs.Consumer.EventHubConsumerClient" /> is unable to read from the requested Event Hub partition due to being denied ownership. In this case, the <see cref="T:Azure.Messaging.EventHubs.EventHubsException.FailureReason" /> will be set to <see cref="F:Azure.Messaging.EventHubs.EventHubsException.FailureReason.ConsumerDisconnected" />. </exception> <altmember cref="T:Azure.Messaging.EventHubs.EventHubsException" /> </Docs> </Member> <Member MemberName="PrefetchCount"> <MemberSignature Language="C#" Value="public int PrefetchCount { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance int32 PrefetchCount" /> <MemberSignature Language="DocId" Value="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" /> <MemberSignature Language="VB.NET" Value="Public Property PrefetchCount As Integer" /> <MemberSignature Language="F#" Value="member this.PrefetchCount : int with get, set" Usage="Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Int32</ReturnType> </ReturnValue> <Docs> <summary> The 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. </summary> <value> The <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" /> is a control that developers can use to help tune performance for the specific needs of an application, given its expected size of events, throughput needs, and expected scenarios for using Event Hubs. </value> <remarks> The size of the prefetch count has an influence on the efficiency of reading events from the Event Hubs service. The larger the size of the cache, the more efficiently service operations can be buffered in the background to improve throughput. This comes at the cost of additional memory use and potentially increases network I/O. For scenarios where the size of events is small and many events are flowing through the system, using a larger <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.CacheEventCount" /> and <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" /> may help improve throughput. For scenarios where the size of events is larger or when processing of events is expected to be a heavier and slower operation, using a smaller size <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.CacheEventCount" /> and <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" /> may help manage resource use without incurring a non-trivial cost to throughput. Regardless of the values, it is generally recommended that the <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" /> be at least 2-3 times as large as the <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.CacheEventCount" /> to allow for efficient buffering of service operations. </remarks> <exception cref="T:System.ArgumentOutOfRangeException">Occurs when the requested count is negative.</exception> </Docs> </Member> <Member MemberName="PrefetchSizeInBytes"> <MemberSignature Language="C#" Value="public long? PrefetchSizeInBytes { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;int64&gt; PrefetchSizeInBytes" /> <MemberSignature Language="DocId" Value="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchSizeInBytes" /> <MemberSignature Language="VB.NET" Value="Public Property PrefetchSizeInBytes As Nullable(Of Long)" /> <MemberSignature Language="F#" Value="member this.PrefetchSizeInBytes : Nullable&lt;int64&gt; with get, set" Usage="Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchSizeInBytes" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.Int64&gt;</ReturnType> </ReturnValue> <Docs> <summary> The desired number of bytes to attempt to eagerly request 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. </summary> <value> <para>When set to <c>null</c>, the option is considered disabled; otherwise, it will be considered enabled and take precedence over any value specified for the <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" />The <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchSizeInBytes" /> is an advanced control that developers can use to help tune performance in some scenarios; it is recommended to prefer using the <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchCount" /> over this option where possible for more accurate control and more predictable throughput.</para> <para>This size should be considered a statement of intent rather than a guaranteed limit; the local cache may be larger or smaller than the number of bytes specified, and will always contain at least one event when the <see cref="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.PrefetchSizeInBytes" /> is specified. A heuristic is used to predict the average event size to use for size calculations, which should be expected to fluctuate as traffic passes through the system. Consequently, the resulting resource use will fluctuate as well.</para> </value> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentOutOfRangeException">Occurs when the requested size is negative.</exception> </Docs> </Member> <Member MemberName="ToString"> <MemberSignature Language="C#" Value="public override string ToString ();" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.ToString" /> <MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" /> <MemberSignature Language="F#" Value="override this.ToString : unit -&gt; string" Usage="readEventOptions.ToString " /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName> <AttributeName Language="F#">[&lt;System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)&gt;]</AttributeName> </Attribute> </Attributes> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Parameters /> <Docs> <summary> Converts the instance to string representation. </summary> <returns>A <see cref="T:System.String" /> that represents this instance.</returns> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="TrackLastEnqueuedEventProperties"> <MemberSignature Language="C#" Value="public bool TrackLastEnqueuedEventProperties { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance bool TrackLastEnqueuedEventProperties" /> <MemberSignature Language="DocId" Value="P:Azure.Messaging.EventHubs.Consumer.ReadEventOptions.TrackLastEnqueuedEventProperties" /> <MemberSignature Language="VB.NET" Value="Public Property TrackLastEnqueuedEventProperties As Boolean" /> <MemberSignature Language="F#" Value="member this.TrackLastEnqueuedEventProperties : bool with get, set" Usage="Azure.Messaging.EventHubs.Consumer.ReadEventOptions.TrackLastEnqueuedEventProperties" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Messaging.EventHubs</AssemblyName> <AssemblyVersion>5.12.0.0</AssemblyVersion> <AssemblyVersion>5.12.1.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Boolean</ReturnType> </ReturnValue> <Docs> <summary> Indicates 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. </summary> <value> <c>true</c> if information about a partition's last event should be requested and tracked; otherwise, <c>false</c>.</value> <remarks> 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. </remarks> </Docs> </Member> </Members> </Type>