gresockj commented on code in PR #7529:
URL: https://github.com/apache/nifi/pull/7529#discussion_r1315053274


##########
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/v2/AbstractAwsProcessor.java:
##########
@@ -192,6 +181,28 @@ public abstract class AbstractAwsProcessor<T extends 
SdkClient, U extends AwsSyn
 
     private final AwsClientCache<T> awsClientCache = new AwsClientCache<>();
 
+    /*
+     * Allow optional override of onTrigger with the ProcessSessionFactory 
where required for AWS processors (e.g. ConsumeKinesisStream)
+     *
+     * @see AbstractProcessor
+     */
+    @Override
+    public void onTrigger(final ProcessContext context, final 
ProcessSessionFactory sessionFactory) throws ProcessException {
+        final ProcessSession session = sessionFactory.createSession();
+        try {
+            onTrigger(context, session);
+            session.commitAsync();
+        } catch (final Throwable t) {

Review Comment:
   I see your point, but this was derived from `AbstractProcessor#onTrigger`, 
which also catches `Throwable`, so I'm inclined to leave it as is.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to