Class KinesisProcessorUtils
java.lang.Object
org.apache.nifi.processors.aws.kinesis.KinesisProcessorUtils
This class provides a base for all kinesis processors
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilterMessagesByMaxSize(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.private static voidhandleFlowFileTooBig(ProcessSession session, FlowFile flowFileCandidate, String message, ComponentLog logger)
-
Field Details
-
MAX_MESSAGE_SIZE
public static final int MAX_MESSAGE_SIZEMax 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 sessionbatchSize- The batch sizemaxBufferSizeBytes- The max buffer size in byteserrorMessageAttribute- The attribute that will contain the error message in case of failurelogger- 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)
-