Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-9475

Provide Framework-Level Retries for NiFi Relationships

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.16.0
    • None
    • None

    Description

      For a processor that routes to failure, in NiFi I have 3 options:

      1) Loop 'failure' back to the processor and retry forever

      2) Auto-terminate or route the data elsewhere without any retries

      3) Build a complex retry loop that creates or updates an attribute, routes on that attribute to determine whether or not we've exceeded the maximum number of retries, and if not penalizes the FlowFile (typically with a Script processor) and then routes back to try the FlowFile again.

      This provides a poor user experience and poor performance and results in very complex flows that are difficult to understand and maintain.

      As a user, when I configure a Processor, I should be able to indicate that for Relationship ABC, I want to retry the FlowFile 5 times. Then, if the Processor transfers a FlowFile to that relationship, it should instead transfer the FlowFile back to its original queue and increment the transfer count for that relationship from 0 to 1 and penalize the FlowFile. If the Processor processes it again and transfers it to the same Relationship again, it'll again put it back to the original queue and increment the count to 2. Only when the data is routed to that Relationship 5 times (because that's the configured retry count in this example) should the FlowFile actually be transferred to that corresponding connection(s) or auto-terminated, as the flow is configured.

      Attachments

        1. image-2022-05-17-09-27-33-222.png
          52 kB
          Mathew Kapkiai

        Issue Links

          Activity

            People

              timeabarna Timea Barna
              timeabarna Timea Barna
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h