PartitionProperties Class

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

public final class PartitionProperties

A set of information for a single partition of an Event Hub.

Method Summary

Modifier and Type Method and Description
long getBeginningSequenceNumber()

Gets the starting sequence number of the partition's message stream.

String getEventHubName()

Gets the name of the Event Hub that contains the partition.

String getId()

Gets the identifier of the partition within the Event Hub.

String getLastEnqueuedOffset()

Gets the offset of the last enqueued message in the partition's stream.

long getLastEnqueuedSequenceNumber()

Gets the last sequence number of the partition's message stream.

Instant getLastEnqueuedTime()

Gets the instant, in UTC, of the last enqueued message in the partition's stream.

boolean isEmpty()

Indicates whether or not the partition is currently empty.

Methods inherited from java.lang.Object

Method Details

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.

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.

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.

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.

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.

Applies to