PartitionReceiveHandler Interface
public interface PartitionReceiveHandler
The handler to invoke after receiving EventDatas from Microsoft Azure EventHubs. Use any implementation of this abstract class to specify user action when using PartitionReceiver's setReceiveHandler().
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract int |
getMaxEventCount()
Maximum number of EventData to supply while invoking onReceive(Iterable<EventData> events) |
abstract void |
onError(Throwable error)
Implement this method to Listen to errors which lead to Closure of the PartitionReceiveHandler pump. |
abstract void |
onReceive(Iterable<EventData> events)
user should implement this method to specify the action to be performed on the received events. |
Method Details
getMaxEventCount
public abstract int getMaxEventCount()
Maximum number of EventData to supply while invoking onReceive(Iterable<EventData> events)
Ensure that the value should be less than or equal to the value of getPrefetchCount()
Returns:
onError
public abstract void onError(Throwable error)
Implement this method to Listen to errors which lead to Closure of the PartitionReceiveHandler pump.
Parameters:
onReceive
public abstract void onReceive(Iterable
user should implement this method to specify the action to be performed on the received events.
Parameters:
Applies to
Azure SDK for Java