Claudio Mattioni created NIFI-15935:
---------------------------------------

             Summary: AMQP processors should clean up resources after 
unexpected processor failures
                 Key: NIFI-15935
                 URL: https://issues.apache.org/jira/browse/NIFI-15935
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
    Affects Versions: 2.9.0
            Reporter: Claudio Mattioni


AMQP processors based on AbstractAMQPProcessor should clean up resources 
consistently after unexpected processor failures.

Current behavior:
- When processResource() throws an Exception, AbstractAMQPProcessor logs the 
failure and yields the context.
- The AMQP resource is not explicitly closed in this generic failure path.
- The ProcessSession is not explicitly rolled back in this catch block.
- If resource creation fails after the executor has been created, the AMQP 
connection is closed, but the executor service is not explicitly shut down.

This can leave AMQP client resources in an inconsistent state after unexpected 
processor failures and can also leave executor resources running when AMQP 
resource creation fails.

Proposed changes:
- Roll back the ProcessSession after unexpected processor failures.
- Close the AMQP resource after unexpected processor failures.
- Shut down the AMQP executor service when resource creation fails.
- Update the executor thread naming pattern to use a generic AMQP client name.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to