安排NiFi处理器在收到当天的第一个流文件时运行

问题描述 投票:0回答:1

我如何安排NiFi处理器仅在收到当天的第一个流文件时才运行。

处理器可以忽略所有后续流文件。

apache-nifi scheduling
1个回答
0
投票

您需要任何存储方式来记住上一个日期。

作为变体,使用DistributedMapCache存储以前的日期

流:

----------------------> FetchDistributedMapCache - get prev date
-(success, not found)-> RouteOnAttribute  - compare previous date with current date
-(not matched)--------> PutDistributedMapCache - store new date
----------------------> next processor that triggered on date change
© www.soinside.com 2019 - 2024. All rights reserved.