-
Notifications
You must be signed in to change notification settings - Fork 846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve output documentation regarding retries and brokers #414
Comments
Hey @inliquid, Benthos never drops messages unless explicitly told to. The Eventually new messages will stop being consumed whilst the failed message is blocking, this is intended as the back pressure prevents Benthos from consuming unlimited memory and claiming messages it cannot process. In your particular case it sounds like you want to simply drop messages if they failed, which you can do with a output:
try:
- http_client:
max_retry_backoff: 30s
retries: 3
backoff_on:
- 429
- 500
url: http://${MONGOD_ADDR:127.0.0.1:9000}/internal/v1/save-data/
... etc ...
- type: drop |
Hi @Jeffail thanks, will this work with I think it's not very well documented as for me there is no way to understand that in order for these parameters to work you have to use some additional complicated |
Yeah I think the output about page needs a bit of an update, ideally it should cover all of these patterns with config examples. Add your processors to the output:
try:
- http_client:
max_retry_backoff: 30s
retries: 3
backoff_on:
- 429
- 500
url: http://${MONGOD_ADDR:127.0.0.1:9000}/internal/v1/save-data/
... etc ...
processors:
- select_parts:
parts: [0]
- type: drop |
http_client
output blocks everything in case of error
Thank you, what about |
If you're consistently attempting payloads that fail without dropping them then eventually the pipeline will be throttled by the constant retry attempts. If you expect certain payloads to always cause 500 and want to quickly drop them rather than block the pipeline then add the status code Edit: Although ideally if this response is caused by a bad or unexpected payload and you're in control of it then ideally you should update the server to respond to those payloads with something like a status 400. |
We use
http_server
as input andhttp_client
as one of outputs (for a part of message batch). In case when there is some error coming fromhttp_client
,benthos
starts to retry this error message indefinitely (#415). However most significant, is that it stops accepting other, normal messages.Here is the log when I first try to send message which causes
http_client
to get 500 error, and then try with the message that should not cause 500 error from the endpoint thathttp_client
connects to:According to logs, second portion of message batch is received, but it's not processed and client (which sends to input) sees timeout.
http_server:
http_client:
The text was updated successfully, but these errors were encountered: