Skip to content

IEventHubReceiver Methods

Abstraction on EventhubReceiver class, used to configure EventHubReceiver class in EventhubAdapterReceiver, also used to configure EHGeneratorReceiver in EventHubAdapterReceiver for testing purpose

CloseAsync

abstract
View source
[System.Obsolete(Use the overload which accepts a CancellationToken.)]
public abstract Task CloseAsync()
Send a clean up message

CloseAsync(CancellationToken)

virtual
View source
public virtual Task CloseAsync(CancellationToken cancellationToken)
Sends a cleanup message which can be canceled.

Parameters

cancellationTokenCancellationToken
The token used to cancel the operation.

Returns

A task representing the operation.

ReceiveAsync(int, TimeSpan)

abstract
View source
[System.Obsolete(Use the overload which accepts a CancellationToken.)]
public abstract Task<IEnumerable<EventData>> ReceiveAsync(int maxCount, TimeSpan waitTime)
Send an async message to the partition asking for more messages

Parameters

maxCountint
Max amount of message which should be delivered in this request
waitTimeTimeSpan
Wait time of this request

ReceiveAsync(int, TimeSpan, CancellationToken)

virtual
View source
public virtual Task<IEnumerable<EventData>> ReceiveAsync(int maxCount, TimeSpan waitTime, CancellationToken cancellationToken)
Sends an asynchronous request for more messages from the partition.

Parameters

maxCountint
The maximum number of messages to return.
waitTimeTimeSpan
The maximum wait time.
cancellationTokenCancellationToken
The token used to cancel the operation.

Returns

The received messages.