EventHubClient EventHubClient 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
EventHubClientEventHubClientEventHubClient

Properties

IsClosed IsClosed IsClosed Inherited from ClientEntity
Path Path Path

Gets the path of the Event Hub.

PrefetchCount PrefetchCount 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 PrefetchSizeInBytes 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 RetryPolicy RetryPolicy Inherited from ClientEntity
ThisLock ThisLock ThisLock Inherited from ClientEntity

Methods

Abort() Abort() Abort() Inherited from ClientEntity
Close() Close() Close() Inherited from ClientEntity
CloseAsync() CloseAsync() CloseAsync() Inherited from ClientEntity
Create(String) Create(String) Create(String)

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

CreateBatch() CreateBatch() CreateBatch()

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

CreateFromConnectionString(String) CreateFromConnectionString(String) 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.

CreateFromConnectionString(String, String) CreateFromConnectionString(String, String) 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.

CreatePartitionedSender(String) CreatePartitionedSender(String) CreatePartitionedSender(String)

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

CreatePartitionedSenderAsync(String) CreatePartitionedSenderAsync(String) CreatePartitionedSenderAsync(String)

Asynchronous version of CreatePartitionedSender(String).

CreateSender(String) CreateSender(String) CreateSender(String)

Creates an Event Hubs sender for the specified publisher.

CreateSenderAsync() CreateSenderAsync() CreateSenderAsync()

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

CreateSenderAsync(String) CreateSenderAsync(String) CreateSenderAsync(String)

Asynchronous version of CreateSender(String).

Fault() Fault() Fault() Inherited from ClientEntity
GetConsumerGroup(String) GetConsumerGroup(String) GetConsumerGroup(String)

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

GetDefaultConsumerGroup() GetDefaultConsumerGroup() GetDefaultConsumerGroup()

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

GetPartitionRuntimeInformation(String) GetPartitionRuntimeInformation(String) GetPartitionRuntimeInformation(String)

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

GetPartitionRuntimeInformationAsync(String) GetPartitionRuntimeInformationAsync(String) GetPartitionRuntimeInformationAsync(String)

Asynchronous version of GetPartitionRuntimeInformation(String).

GetRuntimeInformation() GetRuntimeInformation() GetRuntimeInformation()

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

GetRuntimeInformationAsync() GetRuntimeInformationAsync() GetRuntimeInformationAsync()

Asynchronous version of GetRuntimeInformation().

OnAbort() OnAbort() OnAbort()

Executes the abort action.

OnBeginClose(TimeSpan, AsyncCallback, Object) OnBeginClose(TimeSpan, AsyncCallback, Object) OnBeginClose(TimeSpan, AsyncCallback, Object)

Executes the begin close action.

OnBeginOpen(TimeSpan, AsyncCallback, Object) OnBeginOpen(TimeSpan, AsyncCallback, Object) OnBeginOpen(TimeSpan, AsyncCallback, Object)

Executes the begin open action.

OnClose(TimeSpan) OnClose(TimeSpan) OnClose(TimeSpan)

Executes the close action.

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

Executes the end close action.

OnEndOpen(IAsyncResult) OnEndOpen(IAsyncResult) OnEndOpen(IAsyncResult)

Executes the end open action.

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

Sends event data to an Event Hub.

SendAsync(EventData) SendAsync(EventData) SendAsync(EventData)

Asynchronously sends event data to an Event Hub.

SendBatch(IEnumerable<EventData>) SendBatch(IEnumerable<EventData>) SendBatch(IEnumerable<EventData>)

Sends a batch of event data.

SendBatchAsync(IEnumerable<EventData>) SendBatchAsync(IEnumerable<EventData>) SendBatchAsync(IEnumerable<EventData>)

Asynchronously sends a batch of event data.

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

Extension Methods

IsDefined(Object) IsDefined(Object) IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object) IsNull(Object) IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

Applies to