Class LegacyBlobStorageEventPositionProvider

java.lang.Object
org.apache.nifi.processors.azure.eventhub.position.LegacyBlobStorageEventPositionProvider
All Implemented Interfaces:
EventPositionProvider

public class LegacyBlobStorageEventPositionProvider extends Object implements EventPositionProvider
Event Position Provider using Azure Blob Storage implemented in Azure Event Hubs SDK Version 3
  • Field Details

    • LEASE_SEQUENCE_NUMBER_FIELD

      private static final String LEASE_SEQUENCE_NUMBER_FIELD
      See Also:
    • logger

      private static final org.slf4j.Logger logger
    • objectMapper

      private static final com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • blobContainerAsyncClient

      private final com.azure.storage.blob.BlobContainerAsyncClient blobContainerAsyncClient
    • consumerGroup

      private final String consumerGroup
  • Constructor Details

    • LegacyBlobStorageEventPositionProvider

      public LegacyBlobStorageEventPositionProvider(com.azure.storage.blob.BlobContainerAsyncClient blobContainerAsyncClient, String consumerGroup)
  • Method Details

    • getInitialPartitionEventPosition

      public Map<String,com.azure.messaging.eventhubs.models.EventPosition> getInitialPartitionEventPosition()
      Get Initial Partition Event Position using Azure Blob Storage as persisted in com.microsoft.azure.eventprocessorhost.AzureStorageCheckpointLeaseManager
      Specified by:
      getInitialPartitionEventPosition in interface EventPositionProvider
      Returns:
      Map of Partition and Event Position or empty when no checkpoints found
    • getPartitionEventPosition

      private Map<String,com.azure.messaging.eventhubs.models.EventPosition> getPartitionEventPosition(Iterable<com.azure.storage.blob.models.BlobItem> blobItems)
    • getPartitionId

      private String getPartitionId(com.azure.storage.blob.models.BlobItem blobItem)
    • getEventPosition

      private com.azure.messaging.eventhubs.models.EventPosition getEventPosition(com.azure.storage.blob.models.BlobItem blobItem)
    • containerExists

      private boolean containerExists()
    • itemExists

      private boolean itemExists(com.azure.storage.blob.BlobAsyncClient blobAsyncClient)