connect
connect copied to clipboard
How to close the program gracefully inside the program
Hello, I want to actively close the program inside the program when the program execution meets certain conditions. Is there any good method?
Typically, you'd want to allow Benthos to trigger a shutdown via its internal mechanisms, so you don't weaken its delivery guarantees. There are some notes on when Benthos automatically shuts down in the first few paragraphs here https://www.benthos.dev/docs/components/inputs/about but the essence is that once all inputs have shut down, Benthos will shut itself down.
Adding to @mihaitodor somment: Under benthos streams mode, it is slightly different. the benthos process continues to run even if all the streams have stopped ( completed, input/outputs errored).