Skip to main content

RetryFlowFile

Description

FlowFiles passed to this Processor have a 'Retry Attribute' value checked against a configured 'Maximum Retries' value. If the current attribute value is below the configured maximum, the FlowFile is passed to a retry relationship. The FlowFile may or may not be penalized in that condition. If the FlowFile's attribute value exceeds the configured maximum, the FlowFile will be passed to a 'retries_exceeded' relationship. WARNING: If the incoming FlowFile has a non-numeric value in the configured 'Retry Attribute' attribute, it will be reset to '1'. You may choose to fail the FlowFile instead of performing the reset. Additional dynamic properties can be defined for any attributes you wish to add to the FlowFiles transferred to 'retries_exceeded'. These attributes support attribute expression language.

Tags

FlowFile, Retry

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Retry Attribute *retry-attributeflowfile.retriesThe name of the attribute that contains the current retry count for the FlowFile. WARNING: If the name matches an attribute already on the FlowFile that does not contain a numerical value, the processor will either overwrite that attribute with '1' or fail based on configuration.

Supports Expression Language, using Environment variables.
Maximum Retries *maximum-retries3The maximum number of times a FlowFile can be retried before being passed to the 'retries_exceeded' relationship

Supports Expression Language, using FlowFile attributes and Environment variables.
Penalize Retries *penalize-retriestrue
  • true
  • false
If set to 'true', this Processor will penalize input FlowFiles before passing them to the 'retry' relationship. This does not apply to the 'retries_exceeded' relationship.
Fail on Non-numerical Overwrite *Fail on Non-numerical Overwritefalse
  • true
  • false
If the FlowFile already has the attribute defined in 'Retry Attribute' that is not a number, fail the FlowFile instead of resetting that value to '1'
Reuse Mode *reuse-modeFail on Reuse
  • Fail on Reuse
  • Warn on Reuse
  • Reset Reuse
Defines how the Processor behaves if the retry FlowFile has a different retry UUID than the instance that received the FlowFile. This generally means that the attribute was not reset after being successfully retried by a previous instance of this processor.

Dynamic Properties

NameValueDescription
Exceeded FlowFile Attribute KeyThe value of the attribute added to the FlowFileOne or more dynamic properties can be used to add attributes to FlowFiles passed to the 'retries_exceeded' relationship

Supports Expression Language: Yes, evaluated using FlowFile Attributes and Environment variables.

Relationships

NameDescription
failureThe processor is configured such that a non-numerical value on 'Retry Attribute' results in a failure instead of resetting that value to '1'. This will immediately terminate the limited feedback loop. Might also include when 'Maximum Retries' contains attribute expression language that does not resolve to an Integer.
retries_exceededInput FlowFile has exceeded the configured maximum retry count, do not pass this relationship back to the input Processor to terminate the limited feedback loop.
retryInput FlowFile has not exceeded the configured maximum retry count, pass this relationship back to the input Processor to create a limited feedback loop.

Reads Attributes

NameDescription
Retry AttributeWill read the attribute or attribute expression language result as defined in 'Retry Attribute'

Writes Attributes

NameDescription
Retry Attribute .uuidUser defined retry attribute with .uuid that determines what processor retried the FlowFile last
Retry AttributeUser defined retry attribute is updated with the current retry count

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component requires an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also