Class EventHubBufferedProducerClientOptions
The set of options that can be specified when creating an EventHubBufferedProducerClient to configure its behavior.
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Messaging.EventHubs.dll
Syntax
public class EventHubBufferedProducerClientOptions
Constructors
EventHubBufferedProducerClientOptions()
Initializes a new instance of the EventHubBufferedProducerClientOptions class.
Declaration
public EventHubBufferedProducerClientOptions ();
Properties
ConnectionOptions
The options used for configuring the connection to the Event Hubs service.
Declaration
public Azure.Messaging.EventHubs.EventHubConnectionOptions ConnectionOptions { get; set; }
Property Value
EventHubConnectionOptions
|
EnableIdempotentRetries
Indicates whether or not events should be published using idempotent semantics for retries. If enabled, retries during publishing will attempt to avoid duplication with a minor cost to throughput. Duplicates are still possible but the chance of them occurring is much lower when idempotent retries are enabled.
Declaration
public bool EnableIdempotentRetries { get; set; }
Property Value
System.Boolean
By default, idempotent retries are disabled. |
Remarks
It is important to note that enabling idempotent retries does not guarantee exactly-once semantics. The existing
Event Hubs at-least-once delivery contract still applies and event duplication is unlikely, but possible.
Identifier
A unique name used to identify the consumer. If null
or empty, a GUID will be used as the
identifier.
Declaration
public string Identifier { get; set; }
Property Value
System.String
|
MaximumConcurrentSends
The total number of batches that may be sent concurrently, across all partitions. This limit takes precedence over the value specified in MaximumConcurrentSendsPerPartition, ensuring this maximum is respected.
Declaration
public int MaximumConcurrentSends { get; set; }
Property Value
System.Int32
By default, this will be set to the number of processors available in the host environment. |
Remarks
When batches for the same partition are published concurrently, the ordering of events is not guaranteed. If the order events are published must be maintained, MaximumConcurrentSendsPerPartition should not exceed 1.
Exceptions
System.ArgumentOutOfRangeException
Occurs when the requested count is not between 1 and 100 (inclusive). |
MaximumConcurrentSendsPerPartition
The number of batches that may be sent concurrently for a given partition. This option is superseded by the value specified for MaximumConcurrentSends, ensuring that limit is respected.
Declaration
public int MaximumConcurrentSendsPerPartition { get; set; }
Property Value
System.Int32
By default, each partition will allow only one publishing operation to be active in order to ensure that events are published in the order that they were enqueued. |
Remarks
When batches for the same partition are published concurrently, the ordering of events is not guaranteed. If the order of events must be maintained, MaximumConcurrentSendsPerPartition should not exceed 1.
Exceptions
System.ArgumentOutOfRangeException
Occurs when the requested count is not between 1 and 100 (inclusive). |
MaximumEventBufferLengthPerPartition
The total number of events that can be buffered for publishing at a given time for a given partition. Once this capacity is reached, more events can enqueued by calling EnqueueEventAsync(EventData, EnqueueEventOptions, CancellationToken) or EnqueueEventsAsync(IEnumerable<EventData>, EnqueueEventOptions, CancellationToken), which will automatically wait for room to be available.
Declaration
public int MaximumEventBufferLengthPerPartition { get; set; }
Property Value
System.Int32
The default limit is 1500 queued events for each partition. |
Exceptions
System.ArgumentOutOfRangeException
Occurs when the requested count is not between 1 and 1 million (inclusive). |
MaximumWaitTime
The amount of time to wait for a batch to be built with events in the buffer before publishing a partially full batch.
Declaration
public Nullable<TimeSpan> MaximumWaitTime { get; set; }
Property Value
System.Nullable<System.TimeSpan>
The default wait time is 1 second. For most scenarios, it is recommended to allow for at least 1 second in order to ensure consistent performance. If |
Exceptions
System.ArgumentOutOfRangeException
Occurs when the requested wait time is negative. |
RetryOptions
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 publishing events and other interactions with the Event Hubs service.
Declaration
public Azure.Messaging.EventHubs.EventHubsRetryOptions RetryOptions { get; set; }
Property Value
EventHubsRetryOptions
|
Methods
Equals(Object)
Determines whether the specified System.Object is equal to this instance.
Declaration
[System.ComponentModel.EditorBrowsable]
public override bool Equals (object obj);
Parameters
System.Object
obj
The System.Object to compare with this instance. |
Returns
System.Boolean
|
GetHashCode()
Returns a hash code for this instance.
Declaration
[System.ComponentModel.EditorBrowsable]
public override int GetHashCode ();
Returns
System.Int32
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
ToString()
Converts the instance to string representation.
Declaration
[System.ComponentModel.EditorBrowsable]
public override string ToString ();
Returns
System.String
A System.String that represents this instance. |