[
https://issues.apache.org/jira/browse/NIFI-2834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15630243#comment-15630243
]
ASF GitHub Bot commented on NIFI-2834:
--------------------------------------
Github user olegz commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1167#discussion_r86228341
--- Diff:
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java
---
@@ -121,6 +122,20 @@
.expressionLanguageSupported(false)
.required(false)
.build();
+ static final PropertyDescriptor RECEIVER_FETCH_SIZE = new
PropertyDescriptor.Builder()
+ .name("Partition Recivier Fetch Size")
+ .description("The number of events that a receiver should
fetch from an EventHubs partition before returning. Default(100)")
+ .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
+ .expressionLanguageSupported(false)
+ .required(false)
--- End diff --
Consider making it required with default value set to 100. This will make
the code a bit simpler especially when it gets to line:288 where you can
eliminate the entire IF statement and simply assign.
The same goes for the next property (RECEIVER_FETCH_TIMEOUT) and line:224
> GetAzureEventHub should be more configurable
> --------------------------------------------
>
> Key: NIFI-2834
> URL: https://issues.apache.org/jira/browse/NIFI-2834
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Joseph Percivall
> Assignee: Joseph Niemiec
> Priority: Minor
> Fix For: 1.1.0
>
>
> Current GetAzureEventHub processor is configured to always grab a max batch
> of 100 events per ontrigger[1]. This internal batching scheme should be made
> configurable.
> Also there is an internal default timeout set for PartitionReceivers of 60
> seconds. This means each time the processor is triggered it will be blocked
> waiting for there to be the max number of events (currently 100) before
> canceling 60s later if there isn't 100 events. This should be configurable.
> [1]
> https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java#L215
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)