Dela via


PartitionContext.ReadLastEnqueuedEventProperties Method

Definition

A set of information about the last enqueued event of a partition, as observed by the associated EventHubs client associated with this context as events are received from the Event Hubs service. This is only available if the consumer was created with TrackLastEnqueuedEventProperties set.

public virtual Azure.Messaging.EventHubs.Consumer.LastEnqueuedEventProperties ReadLastEnqueuedEventProperties ();
abstract member ReadLastEnqueuedEventProperties : unit -> Azure.Messaging.EventHubs.Consumer.LastEnqueuedEventProperties
override this.ReadLastEnqueuedEventProperties : unit -> Azure.Messaging.EventHubs.Consumer.LastEnqueuedEventProperties
Public Overridable Function ReadLastEnqueuedEventProperties () As LastEnqueuedEventProperties

Returns

The set of properties for the last event that was enqueued to the partition. If no events were read or tracking was not set, the properties will be returned with default values.

Exceptions

Occurs when this method is invoked without TrackLastEnqueuedEventProperties set.

Occurs when the Event Hubs client needed to read this information is no longer available.

Remarks

When information about the partition's last enqueued event is being tracked, each event received from the Event Hubs service will carry metadata about the partition that it otherwise would not. This results in a small amount of additional network bandwidth consumption that is generally a favorable trade-off when considered against periodically making requests for partition properties using an Event Hub client.

Applies to