Class EventHubOptions
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: Microsoft.Azure.WebJobs.Extensions.EventHubs.dll
Syntax
public class EventHubOptions : Microsoft.Azure.WebJobs.Hosting.IOptionsFormatter
Constructors
EventHubOptions()
Declaration
public EventHubOptions ();
Properties
BatchCheckpointFrequency
Gets or sets the number of batches to process before creating an EventHub cursor checkpoint. Default 1.
Declaration
public int BatchCheckpointFrequency { get; set; }
Property Value
System.Int32
|
ClientRetryOptions
The set of options to use for determining whether a failed operation should be retried and, if so, the amount of time to wait between retry attempts. These options also control the amount of time allowed for receiving event batches and other interactions with the Event Hubs service.
Declaration
public Azure.Messaging.EventHubs.EventHubsRetryOptions ClientRetryOptions { get; set; }
Property Value
Azure.Messaging.EventHubs.EventHubsRetryOptions
|
CustomEndpointAddress
The address to use for establishing a connection to the Event Hubs service, allowing network requests to be routed through any application gateways or other paths needed for the host environment.
Declaration
public Uri CustomEndpointAddress { get; set; }
Property Value
System.Uri
This address will override the default endpoint of the Event Hubs namespace when making the network request to the service. The default endpoint specified in a connection string or by a fully qualified namespace will still be needed to negotiate the connection with the Event Hubs service. |
InitialOffsetOptions
Gets the initial offset options to apply when processing. This only applies when no checkpoint information is available.
Declaration
public Microsoft.Azure.WebJobs.EventHubs.InitialOffsetOptions InitialOffsetOptions { get; }
Property Value
InitialOffsetOptions
|
LoadBalancingUpdateInterval
The desired amount of time to allow between load balancing verification attempts.
Declaration
public TimeSpan LoadBalancingUpdateInterval { get; set; }
Property Value
System.TimeSpan
If not specified, a load balancing interval of 10 seconds will be assumed. |
Remarks
Because load balancing holds less priority than processing events, this interval
should be considered the minimum time that will elapse between verification attempts; operations
with higher priority may cause a minor delay longer than this interval for load balancing.
Exceptions
System.ArgumentOutOfRangeException
Occurs when the requested interval is negative. |
MaxEventBatchSize
Gets or sets the maximum number of events delivered in a batch. Default 10.
Declaration
public int MaxEventBatchSize { get; set; }
Property Value
System.Int32
|
PartitionOwnershipExpirationInterval
The desired amount of time to consider a partition owned by a specific event processor instance before the ownership is considered stale and the partition becomes eligible to be requested by another event processor that wishes to assume responsibility for processing it.
Declaration
public TimeSpan PartitionOwnershipExpirationInterval { get; set; }
Property Value
System.TimeSpan
If not specified, an ownership interval of 30 seconds will be assumed. |
Exceptions
System.ArgumentOutOfRangeException
Occurs when the requested interval is negative. |
PrefetchCount
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.
Declaration
public int PrefetchCount { get; set; }
Property Value
System.Int32
The Azure.Messaging.EventHubs.Primitives.EventProcessorOptions.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. |
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, requesting more events in a batch and using a higher Azure.Messaging.EventHubs.Primitives.EventProcessorOptions.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, requesting fewer events in a batch and using a smaller Azure.Messaging.EventHubs.Primitives.EventProcessorOptions.PrefetchCount may help manage resource use without incurring a non-trivial cost to throughput.
Regardless of the values, it is generally recommended that the Azure.Messaging.EventHubs.Primitives.EventProcessorOptions.PrefetchCount be at least 2-3 times as large as the number of events in a batch to allow for efficient buffering of service operations.
Exceptions
System.ArgumentOutOfRangeException
Occurs when the requested count is negative. |
PrefetchSizeInBytes
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.
Declaration
public Nullable<long> PrefetchSizeInBytes { get; set; }
Property Value
System.Nullable<System.Int64>
When set to 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 Azure.Messaging.EventHubs.Primitives.EventProcessorOptions.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. |
Exceptions
System.ArgumentOutOfRangeException
Occurs when the requested size is negative. |
TrackLastEnqueuedEventProperties
Indicates whether or not the processor should request information on the last enqueued event on the partition associated with a given event, and track that information as events are received.
Declaration
public bool TrackLastEnqueuedEventProperties { get; set; }
Property Value
System.Boolean
|
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.
TransportType
The type of protocol and transport that will be used for communicating with the Event Hubs service.
Declaration
public Azure.Messaging.EventHubs.EventHubsTransportType TransportType { get; set; }
Property Value
Azure.Messaging.EventHubs.EventHubsTransportType
|
WebProxy
The proxy to use for communication over web sockets.
Declaration
public System.Net.IWebProxy WebProxy { get; set; }
Property Value
System.Net.IWebProxy
|
Remarks
A proxy cannot be used for communication over TCP; if web sockets are not in
use, specifying a proxy is an invalid option.
Explicit Interface Implementations
IOptionsFormatter.Format()
Returns a string representation of this EventHubOptions instance.
Declaration
string IOptionsFormatter.Format ();
Returns
System.String
A string representation of this EventHubOptions instance. |