eventhub Package
Packages
aio | |
amqp | |
extensions |
Modules
exceptions |
Classes
CheckpointStore |
CheckpointStore deals with the interaction with the chosen storage service. It can list and claim partition ownerships as well as list and save checkpoints. |
EventData |
The EventData class is a container for event content. |
EventDataBatch |
A batch of events. Sending events in a batch is more performant than sending individual events. EventDataBatch helps you create the maximum allowed size batch of EventData to improve sending performance. Use the add method to add events until the maximum batch size limit in bytes has been reached - at which point a ValueError will be raised. Use the send_batch method of EventHubProducerClient or the async EventHubProducerClient for sending. Please use the create_batch method of EventHubProducerClient to create an EventDataBatch object instead of instantiating an EventDataBatch object directly. WARNING: Updating the value of the instance variable max_size_in_bytes on an instantiated EventDataBatch object is HIGHLY DISCOURAGED. The updated max_size_in_bytes value may conflict with the maximum size of events allowed by the Event Hubs service and result in a sending failure. |
EventHubConnectionStringProperties |
Properties of a connection string. |
EventHubConsumerClient |
The EventHubConsumerClient class defines a high level interface for receiving events from the Azure Event Hubs service. The main goal of EventHubConsumerClient is to receive events from all partitions of an EventHub with load-balancing and checkpointing. When multiple EventHubConsumerClient instances are running against the same event hub, consumer group and checkpointing location, the partitions will be evenly distributed among them. To enable load-balancing and persisted checkpoints, checkpoint_store must be set when creating the EventHubConsumerClient. If a checkpoint store is not provided, the checkpoint will be maintained internally in memory. An EventHubConsumerClient can also receive from a specific partition when you call its method receive() or receive_batch() and specify the partition_id. Load-balancing won't work in single-partition mode. But users can still save checkpoints if the checkpoint_store is set. |
EventHubProducerClient |
The EventHubProducerClient class defines a high level interface for sending events to the Azure Event Hubs service. |
EventHubSharedKeyCredential |
The shared access key credential used for authentication. |
PartitionContext |
Contains partition related context information. A PartitionContext instance will be passed to the event, error and initialization callbacks defined when calling EventHubConsumerClient.receive(). Users can call update_checkpoint() of this class to persist checkpoint data. |
Enums
CloseReason |
The reason a partition consumer is closed. |
LoadBalancingStrategy | |
TransportType |
Transport type The underlying transport protocol type: Amqp: AMQP over the default TCP transport protocol, it uses port 5671. AmqpOverWebsocket: Amqp over the Web Sockets transport protocol, it uses port 443. |
Functions
parse_connection_string
Parse the connection string into a properties bag containing its component parts.
parse_connection_string(conn_str: str) -> EventHubConnectionStringProperties
Parameters
Name | Description |
---|---|
conn_str
Required
|
The connection string that has to be parsed. |
Returns
Type | Description |
---|---|
A properties bag containing the parsed connection string. |
Azure SDK for Python