Class PartitionPublishingOptions
The set of options that can be specified for an EventHubProducerClient to influence its behavior when publishing directly to an Event Hub partition.
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Messaging.EventHubs.dll
Syntax
[System.ComponentModel.EditorBrowsable]
public class PartitionPublishingOptions
Remarks
These options are ignored when publishing to the Event Hubs gateway for automatic
routing or when using a partition key.
Constructors
PartitionPublishingOptions()
Declaration
public PartitionPublishingOptions ();
Properties
OwnerLevel
The owner level indicates that a publishing is intended to be performed exclusively for events in the requested partition in the context of the associated producer group. To do so, publishing will attempt to assert ownership over the partition; in the case where more than one publisher in the producer group attempts to assert ownership for the same partition, the one having a larger OwnerLevel value will "win".
When an owner level is specified, other exclusive publishers which have a lower owner level within the context of the same producer group will either not be allowed to be created or, if they already exist, will encounter an exception during the next attempted operation. Should there be multiple producers in the producer group with the same owner level, each of them will be able to publish to the partition.
Producers with no owner level or which belong to a different producer group are permitted to publish to the associated partition without restriction or awareness of other exclusive producers.
Declaration
public Nullable<short> OwnerLevel { get; set; }
Property Value
System.Nullable<System.Int16>
The relative priority to associate with an exclusive publisher; if |
Remarks
The owner level is only recognized and relevant when certain features of the producer are enabled. For example, it is used by
idempotent publishing. The default owner level is null
.
Exceptions
EventHubsException
Occurs when the owner level is set and the EventHubProducerClient is unable to publish to the requested Event Hub partition due to being denied ownership. In this case, the EventHubsException.FailureReason will be set to ProducerDisconnected. |
See Also
ProducerGroupId
The identifier of the producer group that this producer is associated with when publishing to the associated partition. Events will be published in the context of this group.
Declaration
public Nullable<long> ProducerGroupId { get; set; }
Property Value
System.Nullable<System.Int64>
The identifier of the producer group to associate with the partition; if |
Remarks
The producer group is only recognized and relevant when certain features of the producer are enabled. For example, it is used by
idempotent publishing.
See Also
StartingSequenceNumber
The starting number that should be used for the automatic sequencing of events for the associated partition, when published by this producer.
Declaration
public Nullable<int> StartingSequenceNumber { get; set; }
Property Value
System.Nullable<System.Int32>
The starting sequence number to associate with the partition; if The sequence number will be in the range of The default sequence number is |
Remarks
The starting sequence number is only recognized and relevant when certain features of the producer are enabled. For example, it is used by
idempotent publishing.
See Also
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. |