Integration / Apache NiFi Interview Questions
What is the RouteText processor and how does it differ from RouteOnContent?
RouteText and RouteOnContent are both NiFi processors that route FlowFiles based on patterns found in content, but they operate at fundamentally different granularities.
RouteOnContent: Evaluates the entire FlowFile content against configured regex patterns. If any pattern matches anywhere in the content, the FlowFile is routed to the corresponding relationship. It produces whole-FlowFile routing — one FlowFile in, one FlowFile out on a different relationship. Use case: route JSON or XML FlowFiles based on whether they contain specific keywords or signatures.
RouteText: Operates line-by-line on the FlowFile content. For each line, it evaluates conditions and routes that individual line to a matching relationship. The output is multiple FlowFiles — one per matching relationship — containing only the lines that matched it. Lines matching no condition go to the unmatched relationship. Use case: splitting a multi-type log file where each line is an independent event, routing ERROR lines to an error handler and INFO lines to a general store.
RouteText supports multiple matching strategies: Starts With, Ends With, Contains, Equals, Matches Regex, and Satisfies Expression (NiFi EL evaluated against a text line). The Routing Strategy property controls whether a line matching multiple conditions goes to all matching relationships or only the first.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
