A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/python/api/azure-eventhub/azure.eventhub.eventdata below:

azure.eventhub.EventData class | Microsoft Learn

EventData Class

The EventData class is a container for event content.

Constructor
EventData(body: str | bytes | List | None = None)
Parameters Examples

Create instances of EventData


       from azure.eventhub import EventData

       event_data = EventData("String data")
       event_data = EventData(b"Bytes data")


Methods body_as_json

The content of the event loaded as a JSON object, if the data is compatible.

body_as_json(encoding: str = 'UTF-8') -> Dict[str, Any]
Parameters Returns body_as_str

The content of the event as a string, if the data is of a compatible type.

body_as_str(encoding: str = 'UTF-8') -> str
Parameters Returns from_message_content

Creates an EventData object given content type and a content value to be set as body.

from_message_content(content: bytes, content_type: str, **kwargs: Any) -> EventData
Parameters Returns Attributes body

The body of the Message. The format may vary depending on the body type: For DATA, the body could be bytes or Iterable[bytes]. For SEQUENCE, the body could be List or Iterable[List]. For VALUE, the body could be any type.

Returns body_type

The body type of the underlying AMQP message.

Returns content_type

The content type descriptor. Optionally describes the payload of the message, with a descriptor following the format of RFC2045, Section 5, for example "application/json". :rtype: str or None

correlation_id

The correlation identifier. Allows an application to specify a context for the message for the purposes of correlation, for example reflecting the MessageId of a message that is being replied to. :rtype: str or None

enqueued_time

The enqueued timestamp of the event.

Returns message

Get the underlying uamqp.Message or LegacyMessage. This is deprecated and will be removed in a later release.

Returns message_id

The id to identify the message. The message identifier is an application-defined value that uniquely identifies the message and its payload. The identifier is a free-form string and can reflect a GUID or an identifier derived from the application context. If enabled, the duplicate detection feature identifies and removes second and further submissions of messages with the same message id. :rtype: str or None

offset

The offset of the event.

Returns partition_key

The partition key of the event.

Returns properties

Application-defined properties on the event.

Returns raw_amqp_message

Advanced usage only. The internal AMQP message payload that is sent or received.

Returns sequence_number

The sequence number of the event.

Returns system_properties

Metadata set by the Event Hubs Service associated with the event.

An EventData could have some or all of the following meta data depending on the source of the event data.

Returns

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. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4