Delivery Semantics & Failed message handling #397
Unanswered
FabianTaggr
asked this question in
Q&A
Replies: 1 comment
-
hi @FabianTaggr , If you want to close the consumer in case of exception, it is enough to call MessageHandler = async (_, consumer, context, message) =>
{
try
{
throw new Exception();
}
catch (Exception ex)
{
_logger!.LogError(ex, "Error handling message");
consumer.close(); ///<<<<<<---------here
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! Excited about this project.
But - there's one thing i cannot wrap my head around. When handling of a message fails on the consumer side, why doesn't this "poison" the consumer? As of now i just moves on the next message, which is quite problematic if you ask me. It means I can't really guarantee a message has been successfully processed my application, as it implicitly just skips failed ones.
See my reference implementation of the message handler:
Should i just infinitely retry to essentially block the thread from consuming the next message?
Beta Was this translation helpful? Give feedback.
All reactions