How to clear NiFi queues?

旧城冷巷雨未停 提交于 2019-12-05 11:03:57

In addition to the explicit "Drop Queue" function Bryan mentioned, a couple other features you may be interested are the "Back Pressure" and "FlowFile Expiration" settings on connections. These allow you to automatically control the the amount of data in any given connection. A simple explanation for each is below but for a more detail explanation I'd refer you to the Apache NiFi User Guide

Back Pressure: When a queue gets to a certain size, stop triggering the processor that feeds it.

FlowFile expiration: Once a FlowFile has spent X amount of time in the queue, it will be dropped.

In the Apache NiFi UI if you right-click on a queue there is an option to empty the queue. Anything you can do in the UI is backed by a REST service, so take a look at the REST API docs:

https://nifi.apache.org/docs/nifi-docs/rest-api/index.html

Specifically a POST to /flowfile-queues/{id}/drop-requests.

You can also use Chrome and open developer tools while using the application to see what calls it makes to the REST API when you perform certain actions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!