Catch failed message when service is out-of-memory killed #1181
Unanswered
TobiasWolters
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In our system, we have a handler that handles specific commands, similar to the following:
We have set up second-level retries.
This setup works perfectly if the
JobHandler
fails to handle a job with a regular .NET exception - i.e. theHandleFailed
method inJobHandler
is called.However, in some cases, the pod that runs the
JobHandler
is out-of-memory killed. If this happens too many times, we eventually get the following error:As indicated in the error message, the
ExecuteJob
command is moved to the error queue, but theHandleFailed
method inJobHandler
is never called.Is it possible to somehow catch and react to the failed
ExecuteJob
command in this case?From looking at the code, it seems like it could be possible to implement
IErrorHandler
and register that custom error handler. However, we would like to still use the functionality of the defaultDeadletterQueueErrorHandler
.Any suggestions on how to approach this issue?
Beta Was this translation helpful? Give feedback.
All reactions