connect icon indicating copy to clipboard operation
connect copied to clipboard

How to close the program gracefully inside the program

Open skyoct opened this issue 2 years ago • 2 comments

Hello, I want to actively close the program inside the program when the program execution meets certain conditions. Is there any good method?

skyoct avatar Aug 18 '22 08:08 skyoct

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.

mihaitodor avatar Aug 18 '22 08:08 mihaitodor

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).

mannharleen avatar Sep 02 '22 13:09 mannharleen