greyp9 commented on code in PR #7274: URL: https://github.com/apache/nifi/pull/7274#discussion_r1210698200
########## nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/pubsub/AbstractGCPubSubProcessor.java: ########## @@ -36,16 +37,47 @@ public abstract class AbstractGCPubSubProcessor extends AbstractGCPProcessor implements VerifiableProcessor { - public static final PropertyDescriptor BATCH_SIZE = new PropertyDescriptor.Builder() + public static final PropertyDescriptor BATCH_SIZE_THRESHOLD = new PropertyDescriptor.Builder() .name("gcp-pubsub-publish-batch-size") - .displayName("Batch Size") + .displayName("Batch Size Threshold") .description("Indicates the number of messages the cloud service should bundle together in a batch. If not set and left empty, only one message " + "will be used in a batch") .required(true) .defaultValue("15") .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR) .build(); + public static final PropertyDescriptor BATCH_BYTES_THRESHOLD = new PropertyDescriptor.Builder() + .name("gcp-batch-bytes") + .displayName("Batch Bytes Threshold") + .description("Publish request gets triggered based on this Batch Bytes Threshold property and" + + " the " + BATCH_SIZE_THRESHOLD.getDisplayName() + " property, whichever condition is met first.") + .required(true) + .defaultValue("3 MB") + .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY) + .addValidator(StandardValidators.DATA_SIZE_VALIDATOR) + .build(); + + public static final PropertyDescriptor BATCH_DELAY_THRESHOLD = new PropertyDescriptor.Builder() + .name("gcp-pubsub-publish-batch-delay") + .displayName("Batch Delay Threshold") Review Comment: I chose this name to logically group the AbstractGCPubSubProcessor batching properties: `AbstractGCPubSubProcessor.gcp-pubsub-publish-batch-size` `AbstractGCPubSubProcessor.gcp-batch-bytes` (retained for compatibility) `AbstractGCPubSubProcessor.gcp-pubsub-publish-batch-delay` and to make them distinct from the flowfile batching property: `PublishGCPubSub.max-batch-size` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org