Show / Hide Table of Contents

Struct PartitionEvent

Contains information about a partition that has attempted to receive an event from the Azure Event Hub service, as well as the received event, if any.

Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Messaging.EventHubs.dll
Syntax
public struct PartitionEvent

Constructors

PartitionEvent(PartitionContext, EventData)

Initializes a new instance of the PartitionEvent structure.

Declaration
public PartitionEvent (Azure.Messaging.EventHubs.Consumer.PartitionContext partition, Azure.Messaging.EventHubs.EventData data);
Parameters
PartitionContext partition

The Event Hub partition that the data is associated with.

EventData data

The event that was read, if events were available; otherwise, null.

Properties

Data

An event that was read from the associated Partition.

Declaration
public Azure.Messaging.EventHubs.EventData Data { get; }
Property Value
EventData

The EventData read from the Event Hub partition, if data was available. If a maximum wait time was specified when reading events and no event was available in that time period, null.

Remarks

Ownership of this data, including the memory that holds its EventBody, is assumed to transfer to consumers of the PartitionEvent. It may be considered immutable and is safe to access so long as the reference is held.

Partition

The Event Hub partition that the Data is associated with.

Declaration
public Azure.Messaging.EventHubs.Consumer.PartitionContext Partition { get; }
Property Value
PartitionContext

Back to top Azure SDK for .NET