Class BatchManager

java.lang.Object
io.debezium.server.eventhubs.BatchManager

public class BatchManager extends Object
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • producer

      private final com.azure.messaging.eventhubs.EventHubProducerClient producer
    • configuredPartitionId

      private final String configuredPartitionId
    • configuredPartitionKey

      private final String configuredPartitionKey
    • maxBatchSize

      private final Integer maxBatchSize
    • BATCH_INDEX_FOR_NO_PARTITION_ID

      static final Integer BATCH_INDEX_FOR_NO_PARTITION_ID
    • BATCH_INDEX_FOR_PARTITION_KEY

      static final Integer BATCH_INDEX_FOR_PARTITION_KEY
    • batchOptions

      private final HashMap<Integer,com.azure.messaging.eventhubs.models.CreateBatchOptions> batchOptions
    • batches

      private final HashMap<Integer,EventDataBatchProxy> batches
  • Constructor Details

    • BatchManager

      public BatchManager(com.azure.messaging.eventhubs.EventHubProducerClient producer, String configurePartitionId, String configuredPartitionKey, Integer maxBatchSize)
  • Method Details

    • initializeBatch

      public void initializeBatch()
    • closeAndEmitBatches

      public void closeAndEmitBatches()
    • sendEventToPartitionId

      public void sendEventToPartitionId(com.azure.messaging.eventhubs.EventData eventData, Integer recordIndex, Integer partitionId)
    • emitBatchToEventHub

      private void emitBatchToEventHub(EventDataBatchProxy batch)