如何控制 nifi 中调用 HTTP 处理器的重试 [英] how to control retries of invoke HTTP processor in nifi

查看:55
本文介绍了如何控制 nifi 中调用 HTTP 处理器的重试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如调用HTTP处理器,如果重试关系连接到自身,500个相关错误如何控制重试次数?

For e.g. invoke HTTP processor, if the retry relationship is connected to itself, how to control the number of retries if 500 related error occurred?

我想控制重试次数达到某个计数,例如5 并且在特定时间多次重试.1 分钟后第一次重试,30 分钟后第二次重试,24 小时后第三次重试,就像我想做的那样.

I want to control the number of retries up to some count for e.g. 5 and it much retry at certain time. First retry after 1 min and second after 30 min third after 24 hrs like this I want to do.

推荐答案

从 NiFi 1.10 版本开始,有一个名为 RetryFlowFile 的内置处理器.传递给此处理器的 FlowFile 具有根据配置的最大重试值检查重试属性"值.如果当前属性值低于配置的最大值,则 FlowFile 将传递给重试关系.如果 FlowFile 的属性值超过配置的最大值,FlowFile 将被传递给 retries_exceeded 关系.

From NiFi 1.10 version, there is an inbuilt processor named RetryFlowFile. 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. If the FlowFile’s attribute value exceeds the configured maximum, the FlowFile will be passed to a retries_exceeded relationship.

这篇关于如何控制 nifi 中调用 HTTP 处理器的重试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆