mirror of https://github.com/apache/nifi.git
NIFI-7258 - fix overflow in PutAzureEventHub when not configured correctly
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #4146.
This commit is contained in:
parent
3feb85a030
commit
71bf12976f
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue