Class PartitionContext

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

public class PartitionContext extends Object
A model class to contain partition information of an Event Hub.
  • Constructor Details

    • PartitionContext

      public PartitionContext(String fullyQualifiedNamespace, String eventHubName, String consumerGroup, String partitionId)
      Creates an instance of PartitionContext that contains partition information.
      Parameters:
      fullyQualifiedNamespace - The fully qualified namespace of the Event Hub.
      eventHubName - The Event Hub name.
      consumerGroup - The consumer group name associated with the consumer of an Event Hub.
      partitionId - The partition id of the partition.
      Throws:
      NullPointerException - if fullyQualifiedNamespace, partitionId, eventHubName or consumerGroup or is null.
  • Method Details

    • getFullyQualifiedNamespace

      public String getFullyQualifiedNamespace()
      Returns the fully qualified namespace of the Event Hub.
      Returns:
      the fully qualified namespace of the Event Hub.
    • getPartitionId

      public String getPartitionId()
      Gets the partition id of the Event Hub.
      Returns:
      the partition id of the Event Hub.
    • getEventHubName

      public String getEventHubName()
      Gets the Event Hub name.
      Returns:
      The Event Hub name.
    • getConsumerGroup

      public String getConsumerGroup()
      Gets the consumer group name associated with the consumer of an Event Hub.
      Returns:
      The consumer group name associated with the consumer of an Event Hub.