Class KinesisProcessorUtils

java.lang.Object
org.apache.nifi.processors.aws.kinesis.KinesisProcessorUtils

public class KinesisProcessorUtils extends Object
This class provides a base for all kinesis processors
  • Field Details

    • MAX_MESSAGE_SIZE

      public static final int MAX_MESSAGE_SIZE
      Max buffer size 1 MB
      See Also:
  • Constructor Details

    • KinesisProcessorUtils

      private KinesisProcessorUtils()
  • Method Details

    • filterMessagesByMaxSize

      public static List<FlowFile> filterMessagesByMaxSize(ProcessSession session, int batchSize, long maxBufferSizeBytes, String errorMessageAttribute, ComponentLog logger)
      Filters messages by max size, transferring any flowfiles larger than the max size to Failure.
      Parameters:
      session - The process session
      batchSize - The batch size
      maxBufferSizeBytes - The max buffer size in bytes
      errorMessageAttribute - The attribute that will contain the error message in case of failure
      logger - The component log
      Returns:
      A list of flowfiles that are less than the maximum errorMessageAttribute size
    • handleFlowFileTooBig

      private static void handleFlowFileTooBig(ProcessSession session, FlowFile flowFileCandidate, String message, ComponentLog logger)