Repository navigation
Http_Client stream.enabled=true disable/removal doesn't reliably terminate streaming #4622
kawaiiyummy141-afk
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone! I'm trying to understand the expected shutdown behavior for the Benthos http_client input when stream.enabled: true, and whether there's a recommended way to ensure the streaming HTTP request is actually terminated promptly when the input is disabled/removed. We use the Benthos http_client to read newline-delimited messages from an HTTP stream. When we disable/remove that input, the pipeline does not seem to terminate the stream if it is enabled.
For example, when stream.enabled: false, when the input is disabled/removed, the pipeline logs show the HTTP read gets canceled: "Failed to read response: context canceled".
When the stream.enabled: true, when the input is disabled/removed, the pipeline stops receiving new stream messages but benthos does not log the same "Failed to read response: context canceled" behavior. Instead, shutdown shows broker/shutdown phases like "Waiting for pending acks to resolve before shutting down", "Flushing remaining messages of batch". So it seems that the event loop is not being terminated as expected even after waiting for a while.
My question is for Benthos http_client with stream.enabled: true, what's the expected shutdown behavior when the input is disabled or removed? In particular, should disabling the input immediately cancel the streaming HTTP response read, or is a drain/ack wait expected?
Also, is there a recommended way to force a graceful (or if needed, forceful) shutdown of the streaming request when the input is disabled/removed?
All reactions