turcsanyip commented on code in PR #11243:
URL: https://github.com/apache/nifi/pull/11243#discussion_r3260221546


##########
nifi-extension-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/main/java/org/apache/nifi/amqp/processors/AbstractAMQPProcessor.java:
##########
@@ -244,8 +244,10 @@ public final void onTrigger(final ProcessContext context, 
final ProcessSession s
             context.yield();
             closeResource(resource);
         } catch (Exception e) {
-            getLogger().error("Processor failure", e);
+            getLogger().error("Processor failure, dropping the client", e);
+            session.rollback();
             context.yield();
+            closeResource(resource);
         }

Review Comment:
   @ing-mattioni The original idea was that all client-related exceptions are 
wrapped into `AMQP*Exception` in `processResource()` method and the caller 
needs to close/recreate the resources only for those exception types but not 
for generic exceptions.
   
   In case of a generic exception the client should be fine. So I'm afraid 
recreating the client will not help and the rolled back FlowFile will fail 
again and again causing an infinite loop.
   
   Could you please give an example of a generic error when close + 
createResource() helps?



-- 
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