Reputation: 6459
In our dev enviroment in nifi we have a few logging options, for capturing debugging information if needed, which we usually want to have turned off, but which stay ready to be turned on if we need to debug something.
I'm looking for a good way to toggle on and off this debugging. We can easily disable the processors, but then files build up in the queue behind them.
What is the cleanest way to toggle off not just the processor but the queue in front of it so nothing is routed unless we want to debug?
Ideally I'd prefer a way to turn on and off a few different logging processors spread out across our flows with a single toggle if such an option can be managed.
Upvotes: 0
Views: 177
Reputation: 18630
You can create a process group variable, or use parameters, to create a debug flag. Then put a RouteOnAttribute processor before each logging processor and making a routing decision based on the debug flag. If it is unmatched then auto-terminate the relationship so the flow files are just dropped.
Upvotes: 1