Class PartitionEvent

java.lang.Object
com.azure.messaging.eventhubs.models.PartitionEvent

public class PartitionEvent extends Object
A container for EventData along with the partition information for this event data.
  • Constructor Details

    • PartitionEvent

      public PartitionEvent(PartitionContext partitionContext, EventData eventData, LastEnqueuedEventProperties lastEnqueuedEventProperties)
      Creates an instance of PartitionEvent.
      Parameters:
      partitionContext - The partition information associated with the event data.
      eventData - The event data received from the Event Hub.
      lastEnqueuedEventProperties - The properties of the last enqueued event in the partition.
      Throws:
      NullPointerException - if partitionContext or eventData is null.
  • Method Details

    • getPartitionContext

      public PartitionContext getPartitionContext()
      Returns the partition information associated with the event data.
      Returns:
      The partition information associated with the event data.
    • getData

      public EventData getData()
      Gets the event received from the partition.
      Returns:
      Event received from the partition.
    • getLastEnqueuedEventProperties

      public LastEnqueuedEventProperties getLastEnqueuedEventProperties()
      Gets the properties of the last enqueued event in this partition.
      Returns:
      The properties of the last enqueued event in this partition.