Class PartitionProperties

java.lang.Object
com.azure.messaging.eventhubs.PartitionProperties

public final class PartitionProperties extends Object
A set of information for a single partition of an Event Hub.
  • Method Details

    • getEventHubName

      public String getEventHubName()
      Gets the name of the Event Hub that contains the partition.
      Returns:
      The name of the Event Hub that contains the partition.
    • getId

      public String getId()
      Gets the identifier of the partition within the Event Hub.
      Returns:
      The identifier of the partition within the Event Hub.
    • getBeginningSequenceNumber

      public long getBeginningSequenceNumber()
      Gets the starting sequence number of the partition's message stream.
      Returns:
      The starting sequence number of the partition's message stream.
    • getLastEnqueuedSequenceNumber

      public long getLastEnqueuedSequenceNumber()
      Gets the last sequence number of the partition's message stream.
      Returns:
      The last sequence number of the partition's message stream.
    • getLastEnqueuedOffset

      public String getLastEnqueuedOffset()
      Gets the offset of the last enqueued message in the partition's stream.

      The offset is the relative position for event in the context of the stream. The offset should not be considered a stable value, as the same offset may refer to a different event as events reach the age limit for retention and are no longer visible within the stream.

      Returns:
      The offset of the last enqueued message in the partition's stream.
    • getLastEnqueuedTime

      public Instant getLastEnqueuedTime()
      Gets the instant, in UTC, of the last enqueued message in the partition's stream.
      Returns:
      The instant, in UTC, of the last enqueued message in the partition's stream.
    • isEmpty

      public boolean isEmpty()
      Indicates whether or not the partition is currently empty.
      Returns:
      true if there are no events, and false otherwise.