abp icon indicating copy to clipboard operation
abp copied to clipboard

Handle the exception in `InboxProcessor` and `OutboxSender`.

Open maliming opened this issue 4 years ago • 1 comments

Resolve #11210

maliming avatar Jan 06 '22 12:01 maliming

It is not acceptable to skip an event and continue to publish/consume the next one. Event publish/consume order can be important in some cases. A true solution can be providing a failure policy, by designing a system that the final developer decided what to do on that case (a few times retry, re-queue event with a delay, ignore / drop message, etc. which can depend on the event data).

So, currently,

  • if developers want to ignore errors on event handler, they can easily use try-catch, log and ignore the error.
  • if they want to requeue, they can catch the error and republish the message with a custom data attached to count the error count for example
  • outbox failures should be related to eventbus (e.g. rabbitmq) connections, and waiting and retrying should be enough, instead of ignoring errors and going to the next event.

If you want to think on that and find a complete solution, you're welcome. Otherwise, please keep the issue #11210 open, so we think on it later.

hikalkan avatar Jan 06 '22 19:01 hikalkan

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 15 '23 15:05 CLAassistant