Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Clearing queues from flowfile

avatar
Contributor

i want to clear 'response' queue and any other queues if processor is stopped because of failure( **i stop it with 'template' which works similar to rest api) . I mean it would be perfect if i can clear response ,in case, i have at least 1 flowfile in failure queue. is it possible? can you give me any simple example how can i do it by rest api i mean i only need the json content (information whcih i will need to add delete request as an reponse body)

1 ACCEPTED SOLUTION

avatar

Using your browser's Developer Tools window, use the UI to clear a queue while monitoring the network tab. Everything the Apache NiFi UI does is performed via the REST API. You will be able to see exactly what requests are sent to the server to clear the connection queue and can recreate that programmatically.

The specific API endpoint you want in this case is POST /flowfile-queues/{id}/drop-requestswhere {id} is the connection ID.

View solution in original post

1 REPLY 1

avatar

Using your browser's Developer Tools window, use the UI to clear a queue while monitoring the network tab. Everything the Apache NiFi UI does is performed via the REST API. You will be able to see exactly what requests are sent to the server to clear the connection queue and can recreate that programmatically.

The specific API endpoint you want in this case is POST /flowfile-queues/{id}/drop-requestswhere {id} is the connection ID.