-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Customizable HTTP Server Actions (Sink) Retry Policies #12869
Comments
Hi @jandillmann In stream/event sourcing, a so called poison-pill message is very common to happen, which typically means such a message may cause server to raise an exception or even crash. |
Yes, I agree, 500s should not be retried indefinitely. But a configurable small number of retries might be ok for my use case – it is usually only once per day or even less that a request does not go through. Retrying 429 and 503 sounds like a reasonable choice for me, too. As for KrakenD returning a 500 instead of a more suitable 503 (or have it configurable), I will create an issue there. |
Previously, if an HTTP request received a 503 (Service Unavailable) status, it was marked as a failure without retrying. This has now been fixed so that the request is retried a configurable number of times. Fixes: https://emqx.atlassian.net/browse/EMQX-12217 emqx#12869 (partly)
Previously, if an HTTP request received a 503 (Service Unavailable) status, it was marked as a failure without retrying. This has now been fixed so that the request is retried a configurable number of times. Fixes: https://emqx.atlassian.net/browse/EMQX-12217 emqx#12869 (partly)
What would you like to be added or enhanced?
When using an HTTP Server Action (Sink), the response from the custom backend (connector, HTTP server) can be either successful (2xx response status code), fail (4xx or 5xx response status code), or time out.
For non successful responses, only when the HTTP server does not reply at all or returns a 429 Too Many Requests error the action is retried, otherwise the message is discarded and counts as a failure. Other than the timeout and health check interval, there is no option to customize this behaviour.
It would be helpful to further customize this behaviour, for example:
Why is this needed?
The HTTP endpoint I'm working with is behind a KrakenD API gateway. KrakenD returns a 500 Internal Server Error when the backend is temporarily not available, and there does not seem to be a way to customize this (Lua scripts only work when the backend does send a response).
The text was updated successfully, but these errors were encountered: