Udostępnij za pośrednictwem


EventHubClient Class

Definition

An anchor class used to send and receive events to and from an Event Hub.

public abstract class EventHubClient : Microsoft.ServiceBus.Messaging.ClientEntity
type EventHubClient = class
    inherit ClientEntity
Public MustInherit Class EventHubClient
Inherits ClientEntity
Inheritance
EventHubClient

Properties

DisableEntityLevelPerformanceCounters

Gets or sets a value to indicate if entity level perf counters should be collected in memory. Note that this only affect entity level counters, and namespace level counters are always collected.

IsClosed (Inherited from ClientEntity)
Path

Gets the path of the Event Hub.

PrefetchCount

Gets or sets the number of events that any receive operation will actively cache. By default, this value is inherited from MessagingFactory if the current instance is created from the factory method. Otherwise, the default value is 10,000.

PrefetchSizeInBytes

Gets or sets the maximum size (in bytes) in total that any receive operation will actively cache. The size of each event data is determined by the SerializedSizeInBytes property.

RetryPolicy (Inherited from ClientEntity)
ThisLock (Inherited from ClientEntity)

Methods

Abort()

Performs abort functionality on the messaging entity.

(Inherited from ClientEntity)
Close()

Sends a cleanup message to Service Bus to signal the completion of the usage of an entity.

(Inherited from ClientEntity)
CloseAsync()

Sends a cleanup message asynchronously to Service Bus to signal the completion of the usage of an entity.

(Inherited from ClientEntity)
Create(String)

Creates a new instance of the EventHubClient instance, using a connection string from the application configuration settings.

CreateBatch()

Creates a batch where event data objects can be added for later SendBatch or SendBatchAsync call.

CreateFromConnectionString(String, String)

Creates a new instance of the Event Hubs client using the specified connection string. Use this overload only when the connection string does not use the EntityPath property.

CreateFromConnectionString(String)

Creates a new instance of the Event Hubs client using the specified connection string. You can populate the EntityPath property with the name of the Event Hub.

CreatePartitionedSender(String)

Creates an Event Hubs sender for the specified Event Hubs partition.

CreatePartitionedSenderAsync(String)

Asynchronous version of CreatePartitionedSender(String).

CreateSender(String)

Creates an Event Hubs sender for the specified publisher.

CreateSenderAsync()

Creates the Event Hubs sender. This method is for internal use, and not meant to be called from user code.

CreateSenderAsync(String)

Asynchronous version of CreateSender(String).

CreateWithAzureActiveDirectory(Uri, String, AzureActiveDirectoryTokenProvider+AuthenticationCallback, String, Nullable<TimeSpan>, Boolean)

Creates a new instance of the EventHubClient by using Azure Active Directory authentication context.

CreateWithManagedIdentity(Uri, String, Nullable<TimeSpan>, Boolean)

Creates a new instance of the EventHubClient by using Azure Managed Identity authentication.

Fault()

For internal use only. Do not inherit from this class.

(Inherited from ClientEntity)
GetConsumerGroup(String)

Returns the consumer group with the specified name, for the receive operation of event data.

GetDefaultConsumerGroup()

Returns the default consumer group, for the receive operation of event data.

GetPartitionRuntimeInformation(String)

Retrieves runtime information for the specified partition of the Event Hub.

GetPartitionRuntimeInformationAsync(String)

Asynchronous version of GetPartitionRuntimeInformation(String).

GetRuntimeInformation()

Retrieves Event Hubs runtime information, which is required for creating EventHubSender or EventHubReceiver objects.

GetRuntimeInformationAsync()

Asynchronous version of GetRuntimeInformation().

OnAbort()

Executes the abort action.

OnBeginClose(TimeSpan, AsyncCallback, Object)

Executes the begin close action.

OnBeginOpen(TimeSpan, AsyncCallback, Object)

Executes the begin open action.

OnClose(TimeSpan)

Executes the close action.

OnClosed() (Inherited from ClientEntity)
OnEndClose(IAsyncResult)

Executes the end close action.

OnEndOpen(IAsyncResult)

Executes the end open action.

OnFaulted() (Inherited from ClientEntity)
OnOpen(TimeSpan) (Inherited from ClientEntity)
OnOpened() (Inherited from ClientEntity)
Send(EventData)

Sends event data to an Event Hub.

SendAsync(EventData)

Asynchronously sends event data to an Event Hub.

SendBatch(IEnumerable<EventData>)

Sends a batch of event data.

SendBatchAsync(IEnumerable<EventData>)

Asynchronously sends a batch of event data.

ThrowIfClosed() (Inherited from ClientEntity)
ThrowIfDisposed() (Inherited from ClientEntity)
ThrowIfDisposedOrImmutable() (Inherited from ClientEntity)
ThrowIfDisposedOrNotOpen() (Inherited from ClientEntity)
ThrowIfFaulted() (Inherited from ClientEntity)

Applies to