EventHubEvent Class
A concrete implementation of Event Hub message type.
Constructor
EventHubEvent(*, body: bytes, trigger_metadata: Mapping[str, Datum] | None = None, enqueued_time: datetime | None = None, partition_key: str | None = None, sequence_number: int | None = None, offset: str | None = None, iothub_metadata: Mapping[str, str] | None = None)
Keyword-Only Parameters
Name | Description |
---|---|
body
Required
|
|
trigger_metadata
|
Default value: None
|
enqueued_time
|
Default value: None
|
partition_key
|
Default value: None
|
sequence_number
|
Default value: None
|
offset
|
Default value: None
|
iothub_metadata
|
Default value: None
|
Methods
get_body |
get_body
get_body() -> bytes
Attributes
enqueued_time
iothub_metadata
metadata
Getting read-only trigger metadata in a Python dictionary.
Exposing the raw trigger_metadata to our customer. For cardinality=many scenarios, each event points to the common metadata of all the events.
So when using metadata field when cardinality=many, it only needs to take one of the events to get all the data (e.g. events[0].metadata).
Returns:
typing.Mapping[str, object] Return the Python dictionary of trigger metadata
offset
partition_key
sequence_number
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for Python