Sdílet prostřednictvím


EventProcessor<TPartition>.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.

protected virtual Azure.Messaging.EventHubs.Consumer.LastEnqueuedEventProperties ReadLastEnqueuedEventProperties (string partitionId);
abstract member ReadLastEnqueuedEventProperties : string -> Azure.Messaging.EventHubs.Consumer.LastEnqueuedEventProperties
override this.ReadLastEnqueuedEventProperties : string -> Azure.Messaging.EventHubs.Consumer.LastEnqueuedEventProperties
Protected Overridable Function ReadLastEnqueuedEventProperties (partitionId As String) As LastEnqueuedEventProperties

Parameters

partitionId
String

The identifier of the Event Hub partition to read the properties from.

Returns

The set of properties for the last event that was enqueued to the partition.

Exceptions

Occurs when this method is invoked without TrackLastEnqueuedEventProperties set or when the processor is not running.

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