你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

PartitionContext Class

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

public class PartitionContext

A model class to contain partition information of an Event Hub.

Constructor Summary

Constructor Description
PartitionContext(String fullyQualifiedNamespace, String eventHubName, String consumerGroup, String partitionId)

Creates an instance of PartitionContext that contains partition information.

Method Summary

Modifier and Type Method and Description
String getConsumerGroup()

Gets the consumer group name associated with the consumer of an Event Hub.

String getEventHubName()

Gets the Event Hub name.

String getFullyQualifiedNamespace()

Returns the fully qualified namespace of the Event Hub.

String getPartitionId()

Gets the partition id of the Event Hub.

Methods inherited from java.lang.Object

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.

Method Details

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.

getEventHubName

public String getEventHubName()

Gets the Event Hub name.

Returns:

The Event Hub name.

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.

Applies to