PartitionReceiver Class

Recieves events asynchronously until lease is lost.

Inheritance
builtins.object
PartitionReceiver

Constructor

PartitionReceiver(eh_partition_pump)

Parameters

eh_partition_pump

Methods

process_error_async

Handles processing errors this is never called since python recieve client doesn't have error handling implemented (TBD add fault pump handling).

process_events_async

This method is called on the thread that the EH client uses to run the pump. There is one pump per EventHubClient. Since each PartitionPump creates a new EventHubClient, using that thread to call OnEvents does no harm. Even if OnEvents is slow, the pump will get control back each time OnEvents returns, and be able to receive a new batch of messages with which to make the next OnEvents call.The pump gains nothing by running faster than OnEvents.

run

Runs the async partion reciever event loop to retrive messages from the event queue.

process_error_async

Handles processing errors this is never called since python recieve client doesn't have error handling implemented (TBD add fault pump handling).

async process_error_async(error)

Parameters

error
Exception
Required

An error the occurred.

process_events_async

This method is called on the thread that the EH client uses to run the pump. There is one pump per EventHubClient. Since each PartitionPump creates a new EventHubClient, using that thread to call OnEvents does no harm. Even if OnEvents is slow, the pump will get control back each time OnEvents returns, and be able to receive a new batch of messages with which to make the next OnEvents call.The pump gains nothing by running faster than OnEvents.

async process_events_async(events)

Parameters

events
<xref:<xref:list of ~azure.eventhub.common.EventData>>
Required

List of events to be processed.

run

Runs the async partion reciever event loop to retrive messages from the event queue.

async run()