This is an automated email from the ASF dual-hosted git repository.
pvillard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/master by this push:
new 71bf129 NIFI-7258 - fix overflow in PutAzureEventHub when not
configured correctly
71bf129 is described below
commit 71bf12976f98d7d4cad7edf53bd4707856187590
Author: Pierre Villard <[email protected]>
AuthorDate: Mon Mar 16 18:58:55 2020 +0100
NIFI-7258 - fix overflow in PutAzureEventHub when not configured correctly
Signed-off-by: Pierre Villard <[email protected]>
This closes #4146.
---
.../apache/nifi/processors/azure/eventhub/PutAzureEventHub.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
index 2c9a8ae..ec47384 100644
---
a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
+++
b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
@@ -179,7 +179,12 @@ public class PutAzureEventHub extends AbstractProcessor {
@Override
public void onTrigger(final ProcessContext context, final ProcessSession
session) throws ProcessException {
- populateSenderQueue(context);
+ try {
+ populateSenderQueue(context);
+ } catch (ProcessException e) {
+ context.yield();
+ throw e;
+ }
final StopWatch stopWatch = new StopWatch(true);
@@ -343,7 +348,7 @@ public class PutAzureEventHub extends AbstractProcessor {
EventHubClientImpl.USER_AGENT = "ApacheNiFi-azureeventhub/2.3.2";
return EventHubClient.createSync(getConnectionString(namespace,
eventHubName, policyName, policyKey), executor);
} catch (IOException | EventHubException |
IllegalConnectionStringFormatException e) {
- getLogger().error("Failed to create EventHubClient due to {}", e);
+ getLogger().error("Failed to create EventHubClient due to {}", new
Object[]{e.getMessage()}, e);
throw new ProcessException(e);
}
}