This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch support/nifi-1.11.x in repository https://gitbox.apache.org/repos/asf/nifi.git
commit 53ca44d9625dc7681d717d332c893bb50517224a 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); } }
