共用方式為


EventData Class

Definition

An Event Hubs event, encapsulating a set of data and its associated metadata.

public class EventData : Azure.Messaging.MessageContent
type EventData = class
    inherit MessageContent
Public Class EventData
Inherits MessageContent
Inheritance

Constructors

EventData()

Initializes a new instance of the EventData class.

EventData(AmqpAnnotatedMessage)

Initializes a new instance of the EventData class.

EventData(BinaryData)

Initializes a new instance of the EventData class.

EventData(ReadOnlyMemory<Byte>)

Initializes a new instance of the EventData class.

EventData(String)

Initializes a new instance of the EventData class.

Properties

ContentType

A MIME type describing the data contained in the EventBody, intended to allow consumers to make informed decisions for inspecting and processing the event.

CorrelationId

An application-defined value that represents the context to use for correlation across one or more operations. The identifier is a free-form value and may reflect a unique identity or a shared data element with significance to the application.

Data

Gets or sets the data.

(Inherited from MessageContent)
EnqueuedTime

The date and time, in UTC, of when the event was enqueued in the Event Hub partition.

EventBody

The data associated with the event, in BinaryData form, providing support for a variety of data transformations and ObjectSerializer integration.

IsReadOnly

Gets whether the message is read only or not. This can be overriden by inheriting classes to specify whether or not the message can be modified.

(Inherited from MessageContent)
MessageId

An application-defined value that uniquely identifies the event. The identifier is a free-form value and can reflect a GUID or an identifier derived from the application context.

Offset

The offset of the event when it was received from the associated Event Hub partition.

PartitionKey

The partition hashing key applied to the batch that the associated EventData, was published with.

Properties

The set of free-form properties which may be used for associating metadata with the event that is meaningful within the application context.

SequenceNumber

The sequence number assigned to the event when it was enqueued in the associated Event Hub partition.

SystemProperties

The set of free-form event properties which were provided by the Event Hubs service to pass metadata associated with the event or associated Event Hubs operation.

Methods

GetRawAmqpMessage()

The event representation in the AMQP protocol format. This allows access to protocol information that is not relevant to Event Hubs and is not exposed by EventData directly. This information can be helpful when exchanging data with other message brokers or clients that do not use one of the Event Hubs SDKs.

Applies to