linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

Configuration for EventBus to not propagate error when already store failed event in Dead Letter #5161

Closed quantranhong1999 closed 2 months ago

quantranhong1999 commented 3 months ago

Why

Today given e.g. RabbitMQ is down, EventBus can not dispatch the event to RabbitMQ, and it would persist the event into dead letter (in the database).

Today even when stored the event in dead letter, EventBus still propagates the error back and fails the IMAP APPEND or IMAP STORE for example (while the mail is stored and just Added event has not been processed yet while being in dead letters).

Given today we are more or less robust on auto reprocessing the failed event (from event dead letters), we could consider not propagating the error back and failing the original call.

How

Add a boolean configuration entry in rabbitmq.properties to enable/disable EventBus error propagation upon storing failed events in dead letters.

quantranhong1999 commented 2 months ago

https://github.com/apache/james-project/pull/2245

TODO TMail part after that got merged.

quantranhong1999 commented 2 months ago

TODO TMail part after that got merged.

https://github.com/linagora/tmail-backend/pull/1052